제출 #861671

#제출 시각아이디문제언어결과실행 시간메모리
861671cirnepqCoins (IOI17_coins)C++14
컴파일 에러
0 ms0 KiB
#include "coins.h"

std::vector<int> coin_flips(std::vector<int> b, int c) {
    std::vector<int> flips(1);
    if (c==0) {
		if (b[0]==1) flips[0]=63;
		else flips[0]=1;
	}
	else {
		if (b[0]==0) flips[0]=63;
		else flip[0]=1;
	}

    return flips;
}

int find_coin(std::vector<int> b) {
    if (b[0] == 1){
        return 0
    }
    return 1
}

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

coins.cpp: In function 'std::vector<int> coin_flips(std::vector<int>, int)':
coins.cpp:11:8: error: 'flip' was not declared in this scope; did you mean 'flips'?
   11 |   else flip[0]=1;
      |        ^~~~
      |        flips
coins.cpp: In function 'int find_coin(std::vector<int>)':
coins.cpp:19:17: error: expected ';' before '}' token
   19 |         return 0
      |                 ^
      |                 ;
   20 |     }
      |     ~            
coins.cpp:21:13: error: expected ';' before '}' token
   21 |     return 1
      |             ^
      |             ;
   22 | }
      | ~