Submission #717638

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

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