Submission #474069

#TimeUsernameProblemLanguageResultExecution timeMemory
474069ValiAntonieMemory (IOI10_memory)C++14
0 / 100
1 ms200 KiB
#include "grader.h" #include "memory.h" #include <bits/stdc++.h> using namespace std; void play() { // faceup(); int ap[100], path[100], nr; for(int i=1;i<=50;i++){ char x = faceup(i); if(ap[x] > 3) ap[x] = 0; if(path[x] > 100) path[x] = 0; ap[x]++; if(ap[x] == 1) path[x] = i; else{ if(path[x] == i - 1 && i % 2 == 0) continue; 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:15: warning: array subscript has type 'char' [-Wchar-subscripts]
   13 |         if(ap[x] > 3)
      |               ^
memory.cpp:14:16: warning: array subscript has type 'char' [-Wchar-subscripts]
   14 |             ap[x] = 0;
      |                ^
memory.cpp:15:17: warning: array subscript has type 'char' [-Wchar-subscripts]
   15 |         if(path[x] > 100)
      |                 ^
memory.cpp:16:18: warning: array subscript has type 'char' [-Wchar-subscripts]
   16 |             path[x] = 0;
      |                  ^
memory.cpp:17:12: warning: array subscript has type 'char' [-Wchar-subscripts]
   17 |         ap[x]++;
      |            ^
memory.cpp:18:15: warning: array subscript has type 'char' [-Wchar-subscripts]
   18 |         if(ap[x] == 1)
      |               ^
memory.cpp:19:18: warning: array subscript has type 'char' [-Wchar-subscripts]
   19 |             path[x] = i;
      |                  ^
memory.cpp:21:21: warning: array subscript has type 'char' [-Wchar-subscripts]
   21 |             if(path[x] == i - 1 && i % 2 == 0)
      |                     ^
memory.cpp:24:29: warning: array subscript has type 'char' [-Wchar-subscripts]
   24 |                 faceup(path[x]);
      |                             ^
memory.cpp:28:29: warning: array subscript has type 'char' [-Wchar-subscripts]
   28 |                 faceup(path[x]);
      |                             ^
memory.cpp:10:29: warning: unused variable 'nr' [-Wunused-variable]
   10 |     int ap[100], path[100], nr;
      |                             ^~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...