제출 #91053

#제출 시각아이디문제언어결과실행 시간메모리
91053YottaByte은행 (IZhO14_bank)C++14
0 / 100
2 ms628 KiB
#include <stdio.h> using namespace std; const int N = 1e5 + 1; #define ll long long #define ok puts("OK"); int n, m, x; main() { scanf("%d %d", &n, &m); scanf("%d", &x); for(int i = 1; i <= n; i++) { int y; scanf("%d", y); if(y == x) { puts("YES"); return 0; } } puts("NO"); }

컴파일 시 표준 에러 (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:16:23: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'int' [-Wformat=]
   int y; scanf("%d", y);
                       ^
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);
  ~~~~~^~~~~~~~~~~~~~~~~
bank.cpp:13:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d", &x);
  ~~~~~^~~~~~~~~~
bank.cpp:16:15: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   int y; scanf("%d", y);
          ~~~~~^~~~~~~~~
bank.cpp:16:15: warning: 'y' may be used uninitialized in this function [-Wmaybe-uninitialized]
   int y; scanf("%d", y);
          ~~~~~^~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...