Submission #860048

#TimeUsernameProblemLanguageResultExecution timeMemory
860048QuackPhucBank (IZhO14_bank)C++17
Compilation error
0 ms0 KiB
#include<iostream> using namespace std; string solved() { int N; int M; cin>>N>>M; int array_N[N]; int array_M[M]; for(int i = 0; i < N; i++) cin>>array_N[i]; for(int i = 0; i < M; i++) cin>>array_M[i]; for(int i = 0; i < M - 1; i++) { for(int j = i+1; j < M; j++) { if(array_M[j] == array_N[0] - array_M[i]) return "YES"; } } return "NO"; } void main() { solved(); }

Compilation message (stderr)

bank.cpp:23:1: error: '::main' must return 'int'
   23 | void main()
      | ^~~~