제출 #717660

#제출 시각아이디문제언어결과실행 시간메모리
717660VMaksimoski008Memory (IOI10_memory)C++14
컴파일 에러
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 ; } } } }

컴파일 시 표준 에러 (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())
      |                        ^~~~