|
|
вернуться в форумWhy Runtime error (stack overflow) C++ help pls!! #include <iostream> using namespace std; int main() { int N, M; int S[15001]; int S1[1000001]; cin >> N; for (int i1 = 1; i1 <= N; i1++) cin >> S[i1]; int f = 0; cin >> M; for (int i = 1; i <= M; i++) cin >> S1[i]; for (int i1 = 1; i1 <= N; i1++) for (int i = 1; i <= M; i++) if (S[i1] == S1[i]) f++; cout << f; }
Re: Why Runtime error (stack overflow) C++ help pls!! S[15001] <--> S[0..15000] S1[1000001] <--> S1[0..1000000] |
|
|