#include "coreputer.h"
using namespace std;
vector<int> malfunctioning_cores(int N) {
vector<int> c(N);
int k = run_diagnostic({0});
if (k == 1){
c[0] = 1;
return c;
}
if (k == -1){
c[1] = 1;
return c;
}
if (k == 0){
int u = run_diagnostic({0, 1});
if (u == 1){
c[0] = 1;
c[1] = 1;
return c;
}
if (u == 0){
return c;
}
}
return c;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
428 KB |
Output is correct |
2 |
Correct |
0 ms |
356 KB |
Output is correct |
3 |
Correct |
1 ms |
356 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
356 KB |
Output is correct |
2 |
Correct |
0 ms |
356 KB |
Output is correct |
3 |
Incorrect |
1 ms |
356 KB |
Incorrect |
4 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
428 KB |
Output is correct |
2 |
Correct |
0 ms |
356 KB |
Output is correct |
3 |
Correct |
1 ms |
356 KB |
Output is correct |
4 |
Correct |
0 ms |
356 KB |
Output is correct |
5 |
Correct |
0 ms |
356 KB |
Output is correct |
6 |
Incorrect |
1 ms |
356 KB |
Incorrect |
7 |
Halted |
0 ms |
0 KB |
- |