#include<bits/stdc++.h>
#define MAXN 100007
using namespace std;
int n,m,curr,res[MAXN];
bool good[MAXN],special[MAXN],pr[MAXN];
vector<int> v[MAXN],ans;
vector<int> who_wins(vector<int> A,vector<int> R, vector<int> from,vector<int> to){
n=int(A.size()); m=int(from.size());
for(int i=0;i<n;i++){
if(A[i]==1)good[i]=true;
if(R[i]==1)special[i]=true;
}
for(int i=0;i<m;i++){
if(from[i]==to[i])pr[from[i]]=true;
v[from[i]].push_back(to[i]);
}
for(int i=n-1;i>=0;i--){
if(pr[i]){
if(good[i])curr=1;
else curr=0;
}
res[i]=curr;
}
for(int i=0;i<n;i++){
ans.push_back(res[i]);
}
return ans;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
4 ms |
3028 KB |
3rd lines differ - on the 1st token, expected: '0', found: '1' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
2644 KB |
3rd lines differ - on the 1st token, expected: '0', found: '1' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
6 ms |
3284 KB |
3rd lines differ - on the 1st token, expected: '0', found: '1' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
6 ms |
3156 KB |
3rd lines differ - on the 1st token, expected: '1', found: '0' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
7 ms |
3356 KB |
3rd lines differ - on the 1st token, expected: '1', found: '0' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
4 ms |
3028 KB |
3rd lines differ - on the 1st token, expected: '0', found: '1' |
2 |
Halted |
0 ms |
0 KB |
- |