Submission #91051

#TimeUsernameProblemLanguageResultExecution timeMemory
91051YottaByteBank (IZhO14_bank)C++14
Compilation error
0 ms0 KiB
#include <stdio.h> using namespace std; const int N = 1e5 + 1; #define ll long long #define ok puts("OK"); int n, m, x[N]; main() { scanf("%d %d", &n, &m); scanf("%d", &x[i]) for(int i = 1; i <= n; i++) { int y; scanf("%d", y); if(x[y]) { puts("YES"); return 0; } } puts("NO"); }

Compilation message (stderr)

bank.cpp:10:6: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
 main()
      ^
bank.cpp: In function 'int main()':
bank.cpp:13:20: error: 'i' was not declared in this scope
     scanf("%d", &x[i])
                    ^
bank.cpp:12:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d %d", &n, &m);
  ~~~~~^~~~~~~~~~~~~~~~~