제출 #1317406

#제출 시각아이디문제언어결과실행 시간메모리
1317406matrix081Memory (IOI10_memory)C++20
컴파일 에러
0 ms0 KiB
#include "grader.h" #include "memory.h" #include <vector> #include <iostream> using namespace std; void play() { int i,j, candies=0; char a, b; vector <int> guessed(25); for (i=1; i<50; i+2) { a = faceup(i-1); b = faceup(i); guessed[int(a)-65] = a; guessed[int(b)-65] = b; } for (i=0;i<50 && candies<=25,i++){ c = faceup(i); b = faceup(int(c)-65); if(c==b){ candies+=1; } } }

컴파일 시 표준 에러 (stderr) 메시지

memory.cpp: In function 'void play()':
memory.cpp:19:36: error: expected ';' before ')' token
   19 |    for (i=0;i<50 && candies<=25,i++){
      |                                    ^
      |                                    ;
memory.cpp:20:7: error: 'c' was not declared in this scope
   20 |       c = faceup(i);
      |       ^