(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.

Submission #220831

#TimeUsernameProblemLanguageResultExecution timeMemory
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]); } }

Compilation message (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...