Submission #717660

#TimeUsernameProblemLanguageResultExecution timeMemory
717660VMaksimoski008Memory (IOI10_memory)C++14
Compilation error
0 ms0 KiB
#include "grader.h" #include "memory.h" void play() { int candies = 0; char a, b; set<int> used; for(int i=1; i<=50; i++) { for(int j=1; j<=50; j++) { if(i != j && used.find(i) == used.end() && used.find(j) == used.end()) { a = faceup(i); b = faceup(j); if(a == b) { candies++; used.insert(i); used.insert(j); } if(candies == 25) return ; } } } }

Compilation message (stderr)

memory.cpp: In function 'void play()':
memory.cpp:8:3: error: 'set' was not declared in this scope
    8 |   set<int> used;
      |   ^~~
memory.cpp:8:7: error: expected primary-expression before 'int'
    8 |   set<int> used;
      |       ^~~
memory.cpp:14:24: error: 'used' was not declared in this scope
   14 |           if(i != j && used.find(i) == used.end() && used.find(j) == used.end())
      |                        ^~~~