제출 #1317427

#제출 시각아이디문제언어결과실행 시간메모리
1317427matrix081Memory (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,c,d; vector <int> guessed(25); for (i=1; i<=50; i+=2) { a = faceup(i-1); b = faceup(i); guessed[int(a)-65] = i-1; guessed[int(b)-65] = i; } for (i=0; i<50; i++;){ if(candies>=25){ break; } c = faceup(i); d = faceup(guessed[int(c)-65]); if(c==d){ candies+=1; } } }

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

memory.cpp: In function 'void play()':
memory.cpp:19:23: error: expected ')' before ';' token
   19 |    for (i=0; i<50; i++;){
      |        ~              ^
      |                       )
memory.cpp:19:24: error: expected primary-expression before ')' token
   19 |    for (i=0; i<50; i++;){
      |                        ^