Submission #1207198

#TimeUsernameProblemLanguageResultExecution timeMemory
1207198DpikaMemory (IOI10_memory)C++20
Compilation error
0 ms0 KiB
#include "grader.h" #include "memory.h" #include <vector> vector<int>v1(25); vector<int>v2(25); void play() { int i; char a, b; for (i=0; i<100; i=i+2) { if(i>=50){ int x,y; x=v1[(i-50)/2]; y=v2[(i-50)/2]; a = faceup(x); b = faceup(y); } else{ a = faceup(i+1); b = faceup(i+2); v1[a-65]=i+1; v2[b-65]=i+2; } } }

Compilation message (stderr)

memory.cpp:4:1: error: 'vector' does not name a type
    4 | vector<int>v1(25);
      | ^~~~~~
memory.cpp:5:1: error: 'vector' does not name a type
    5 | vector<int>v2(25);
      | ^~~~~~
memory.cpp: In function 'void play()':
memory.cpp:12:12: error: 'v1' was not declared in this scope
   12 |          x=v1[(i-50)/2];
      |            ^~
memory.cpp:13:12: error: 'v2' was not declared in this scope
   13 |          y=v2[(i-50)/2];
      |            ^~
memory.cpp:20:10: error: 'v1' was not declared in this scope
   20 |          v1[a-65]=i+1;
      |          ^~
memory.cpp:21:10: error: 'v2' was not declared in this scope
   21 |          v2[b-65]=i+2;
      |          ^~