답안 #908254

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
908254 2024-01-16T10:28:56 Z shoryu386 Coreputer (IOI23_coreputer) C++17
20 / 100
1 ms 592 KB
#include "coreputer.h"
#include <bits/stdc++.h>
using namespace std;


vector<int> ntwo(){
	int res = run_diagnostic({0});
	
	if (res == 1){
		return {1, 0};
	}
	else if (res == 0){
		int any = run_diagnostic({0, 1});
		
		if (any == 0){
			return {0, 0};
		}
		else return {1, 1};
	}
	else return {0, 1};
}

vector<int> malfunctioning_cores(int N) {
	if (N == 2){
		return ntwo();
	}
}

Compilation message

coreputer.cpp: In function 'std::vector<int> malfunctioning_cores(int)':
coreputer.cpp:28:1: warning: control reaches end of non-void function [-Wreturn-type]
   28 | }
      | ^
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 1 ms 344 KB Output is correct
3 Correct 1 ms 344 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 592 KB Output is correct
2 Incorrect 0 ms 344 KB Incorrect
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 1 ms 344 KB Output is correct
3 Correct 1 ms 344 KB Output is correct
4 Correct 1 ms 592 KB Output is correct
5 Incorrect 0 ms 344 KB Incorrect
6 Halted 0 ms 0 KB -