Submission #425840

# Submission time Handle Problem Language Result Execution time Memory
425840 2021-06-13T11:52:49 Z Rouge_Hugo Toy Train (IOI17_train) C++14
0 / 100
21 ms 1996 KB
#include<bits/stdc++.h>
#include "train.h"
#define ll long long
#define fi first
#define se second
#define pb push_back
using namespace std;int n,m;
vector<int>ans;
const int N=5090;
int vis[N];
vector<int>v[N];
int r[N];
int dfs(int x)
{
    if(v[x][0]==x)
    {
        if(r[x])return 1;
        return 0;
    }
    return dfs(x+1);
}
vector<int> who_wins(vector<int> A,vector<int> R,vector<int> u,vector<int> uu) {
	n=R.size();m=u.size();
	for(int i=0;i<n;i++)
        r[i]=R[i];
    for(int i=0;i<m;i++)
        v[u[i]].pb(uu[i]);
    for(int i=0;i<n;i++)
    {
        ans.pb(dfs(i));
    }
return ans;
}
# Verdict Execution time Memory Grader output
1 Incorrect 4 ms 716 KB 3rd lines differ - on the 14th token, expected: '1', found: '0'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 588 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 9 ms 1996 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 11 ms 1660 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 21 ms 1988 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 4 ms 716 KB 3rd lines differ - on the 14th token, expected: '1', found: '0'
2 Halted 0 ms 0 KB -