|
|
вернуться в форумCould you tell me, where am I wrong? WA test #10 #include <iostream> using namespace std; int main() { int m; int n; bool q=false; short int a[50000], b[50000]; cin >> m; for (int i=1; i<=m; i++) cin >> a[i]; cin >> n; for (int j=1; j<=n; j++) { cin >> b[j]; if (!q) for (int i=1; i<=m; i++) { if ((a[i]+b[j])==10000) { q=true; break; } if ((a[i]+b[j])>10000) break; } } if (q) cout << "YES"; else cout << "NO"; return 0; } Where is the error? Re: Could you tell me, where am I wrong? WA test #10 Послано OpenGL 22 мар 2009 14:01 Re: Could you tell me, where am I wrong? WA test #10 Thanks very much! Accepted for me! |
|
|