답안 #910246

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
910246 2024-01-18T02:57:41 Z Alphanumeric Coreputer (IOI23_coreputer) C++17
컴파일 오류
0 ms 0 KB
#include "coreputer.h"

std::vector<int> malfunctioning_cores(int N) {
	int ans=run_diagnostic([0]);
	if(ans==1) return {1,0};
	if(ans==-1) return {0,1};
	if(ans==0) return {1,1};
}

Compilation message

coreputer.cpp: In function 'std::vector<int> malfunctioning_cores(int)':
coreputer.cpp:4:26: error: expected identifier before numeric constant
    4 |  int ans=run_diagnostic([0]);
      |                          ^
coreputer.cpp: In lambda function:
coreputer.cpp:4:28: error: expected '{' before ')' token
    4 |  int ans=run_diagnostic([0]);
      |                            ^
coreputer.cpp: In function 'std::vector<int> malfunctioning_cores(int)':
coreputer.cpp:4:28: error: could not convert '<lambda closure object>malfunctioning_cores(int)::<lambda()>{}' from 'malfunctioning_cores(int)::<lambda()>' to 'std::vector<int>'
coreputer.cpp:8:1: warning: control reaches end of non-void function [-Wreturn-type]
    8 | }
      | ^