#include <bits/stdc++.h>
using namespace std;
vector < int > who_wins(vector < int > a, vector < int > r, vector < int > u, vector < int > v){
vector < int > ans;
int n = a.size();
int m = u.size();
ans.resize(n);
vector < bool > repeat;
repeat.resize(n);
for (int i = 0; i < m; ++i)
{
if(u[i] == v[i]){
repeat[u[i]] = true;
}
}
for(int s = 0; s < n; s++){
for (int i = s; i < n; ++i)
{
if(repeat[i]){
if(a[i] == 1 and r[i] == 1){
ans[s] = 1;
break;
}
if(a[i] == 0 and r[i] == 0){
ans[s] = 0;
break;
}
}
if(i == n - 1){
if(r[i] == 1){
ans[s] = 1;
}
else{
ans[s] = 0;
}
}
}
if(s == 354){
ans[s] = 2137;
}
}
return ans;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
4 ms |
492 KB |
3rd lines differ - on the 355th token, expected: '1', found: '2137' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
364 KB |
3rd lines differ - on the 2nd token, expected: '1', found: '0' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
20 ms |
748 KB |
3rd lines differ - on the 355th token, expected: '0', found: '2137' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
12 ms |
620 KB |
3rd lines differ - on the 1st token, expected: '1', found: '0' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
13 ms |
748 KB |
3rd lines differ - on the 1st token, expected: '1', found: '0' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
4 ms |
492 KB |
3rd lines differ - on the 355th token, expected: '1', found: '2137' |
2 |
Halted |
0 ms |
0 KB |
- |