제출 #976377

#제출 시각아이디문제언어결과실행 시간메모리
976377KasymKMemory (IOI10_memory)C++17
0 / 100
1 ms344 KiB
#include "bits/stdc++.h" #include "grader.h" #include "memory.h" using namespace std; const int N = 50; int vis[N]; void play(){ for(int i = 1; i <= 50; ++i) vis[i] = faceup(i); for(int i = 1; i <= 50; ++i) for(int j = i + 1; j <= 50; ++j) if(vis[i] == vis[j]){ faceup(i); faceup(j); } }

컴파일 시 표준 에러 (stderr) 메시지

memory.cpp: In function 'void play()':
memory.cpp:13:16: warning: iteration 49 invokes undefined behavior [-Waggressive-loop-optimizations]
   13 |         vis[i] = faceup(i);
      |         ~~~~~~~^~~~~~~~~~~
memory.cpp:12:22: note: within this loop
   12 |     for(int i = 1; i <= 50; ++i)
      |                    ~~^~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...