Submission #474046

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

Compilation message (stderr)

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