(UPD: 2024-12-04 14:48 UTC) Judge is not working due to Cloudflare incident. (URL) We can do nothing about it, sorry. After the incident is resolved, we will grade all submissions.

제출 #220831

#제출 시각아이디문제언어결과실행 시간메모리
220831mathking1021Memory (IOI10_memory)C++11
100 / 100
7 ms640 KiB
#include "grader.h" #include "memory.h" void play() { char a[55]; int b[128], c[128]; for(char i = 'A'; i <= 'Y'; i++) { b[i] = c[i] = 0; } for(int i = 1; i <= 50; i++) { a[i] = faceup(i); if(b[a[i]]) c[a[i]] = i; else b[a[i]] = i; } for(char i = 'A'; i <= 'Y'; i++) { faceup(b[i]), faceup(c[i]); } }

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

memory.cpp: In function 'void play()':
memory.cpp:9:12: warning: array subscript has type 'char' [-Wchar-subscripts]
         b[i] = c[i] = 0;
            ^
memory.cpp:9:19: warning: array subscript has type 'char' [-Wchar-subscripts]
         b[i] = c[i] = 0;
                   ^
memory.cpp:14:18: warning: array subscript has type 'char' [-Wchar-subscripts]
         if(b[a[i]]) c[a[i]] = i;
                  ^
memory.cpp:14:27: warning: array subscript has type 'char' [-Wchar-subscripts]
         if(b[a[i]]) c[a[i]] = i;
                           ^
memory.cpp:15:20: warning: array subscript has type 'char' [-Wchar-subscripts]
         else b[a[i]] = i;
                    ^
memory.cpp:19:19: warning: array subscript has type 'char' [-Wchar-subscripts]
         faceup(b[i]), faceup(c[i]);
                   ^
memory.cpp:19:33: warning: array subscript has type 'char' [-Wchar-subscripts]
         faceup(b[i]), faceup(c[i]);
                                 ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...