Submission #1175179

#TimeUsernameProblemLanguageResultExecution timeMemory
1175179chanadMemory (IOI10_memory)C++20
Compilation error
0 ms0 KiB
#include "grader.h"
#include "memory.h"

void play() {
   //int i;
   vector<int> p[50];
   int count=0;
   int a=1,b=2;
   for(int i=0;i<25;i++){
      p[faceup(a)-'A']push_back(a);
      p[faceup(b)-'A']push_back(b);
      a++;
      b++;
   }
   for(int i=0;i<25;i++){
      for(auto x:p[i]){
         faceup(x);
      }
   }
   
   return;
}

Compilation message (stderr)

memory.cpp: In function 'void play()':
memory.cpp:6:4: error: 'vector' was not declared in this scope
    6 |    vector<int> p[50];
      |    ^~~~~~
memory.cpp:6:11: error: expected primary-expression before 'int'
    6 |    vector<int> p[50];
      |           ^~~
memory.cpp:10:7: error: 'p' was not declared in this scope
   10 |       p[faceup(a)-'A']push_back(a);
      |       ^
memory.cpp:16:18: error: 'p' was not declared in this scope
   16 |       for(auto x:p[i]){
      |                  ^