Submission #474065

#TimeUsernameProblemLanguageResultExecution timeMemory
474065ValiAntonieMemory (IOI10_memory)C++14
0 / 100
1 ms200 KiB
#include "grader.h" #include "memory.h" #include<bits/stdc++.h> void play() { int ap[100], path[100]; for(int i=1;i<=50;i++){ char x = faceup(i); if(ap[x] > 3) ap[x] = 0; if(path[x] > 3) path[x] = 0; ap[x]++; if(ap[x] == 1) path[x] = i; else{ if(i % 2 == 1){ faceup(path[x]); faceup(i); } else{ faceup(path[x]); faceup(i); } } } }

Compilation message (stderr)

memory.cpp: In function 'void play()':
memory.cpp:8:15: warning: array subscript has type 'char' [-Wchar-subscripts]
    8 |         if(ap[x] > 3)
      |               ^
memory.cpp:9:16: warning: array subscript has type 'char' [-Wchar-subscripts]
    9 |             ap[x] = 0;
      |                ^
memory.cpp:10:17: warning: array subscript has type 'char' [-Wchar-subscripts]
   10 |         if(path[x] > 3)
      |                 ^
memory.cpp:11:18: warning: array subscript has type 'char' [-Wchar-subscripts]
   11 |             path[x] = 0;
      |                  ^
memory.cpp:12:12: warning: array subscript has type 'char' [-Wchar-subscripts]
   12 |         ap[x]++;
      |            ^
memory.cpp:13:15: warning: array subscript has type 'char' [-Wchar-subscripts]
   13 |         if(ap[x] == 1)
      |               ^
memory.cpp:14:18: warning: array subscript has type 'char' [-Wchar-subscripts]
   14 |             path[x] = i;
      |                  ^
memory.cpp:17:29: warning: array subscript has type 'char' [-Wchar-subscripts]
   17 |                 faceup(path[x]);
      |                             ^
memory.cpp:21:29: warning: array subscript has type 'char' [-Wchar-subscripts]
   21 |                 faceup(path[x]);
      |                             ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...