제출 #717638

#제출 시각아이디문제언어결과실행 시간메모리
717638lukatasevMemory (IOI10_memory)C++14
0 / 100
1 ms208 KiB
#include "grader.h" #include "memory.h" #include <algorithm> using namespace std; void play() { char niza[25] = {'0'}, niza2[25]; char current; for(int i=1; i<=50; i++) { current = faceup(i); if(niza[current] == '0') { niza[current] = i; } else { niza2[current] = i; } } sort(niza, niza+25); sort(niza2, niza2+25); for(auto x: niza) { for(auto y: niza2) { faceup(x); faceup(y); } } }

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

memory.cpp: In function 'void play()':
memory.cpp:11:15: warning: array subscript has type 'char' [-Wchar-subscripts]
   11 |       if(niza[current] == '0') {
      |               ^~~~~~~
memory.cpp:12:15: warning: array subscript has type 'char' [-Wchar-subscripts]
   12 |          niza[current] = i;
      |               ^~~~~~~
memory.cpp:14:16: warning: array subscript has type 'char' [-Wchar-subscripts]
   14 |          niza2[current] = i;
      |                ^~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...