|
|
back to boardWA in test 4 Posted by Carbon 9 Apr 2007 19:39 My code must pass in all tests but it falls in 4 #include <iostream.h> int main() { bool array[65536]; for (int i=0;i<65536;i++) array[i]=false; int num; int N1,N2; cin>>N1; for (int i=0;i<N1;i++) { cin>>num; array[num+32768]=true; } cin>>N2; bool found=false; for (int i=0;i<N2;i++) { cin>>num; if (!found) found=array[42768-num]; } cout<<((found)?("YES"):("NO")); return 0; } Re: WA in test 4 Posted by Carbon 9 Apr 2007 19:41 I don't understand why 2 themes were created. Don't write in this one. |
|
|