Submission #812652

# Submission time Handle Problem Language Result Execution time Memory
812652 2023-08-07T09:51:49 Z Dan4Life Toy Train (IOI17_train) C++17
0 / 100
4 ms 852 KB
#include "train.h"
#include <bits/stdc++.h>
using namespace std;
using vi = vector<int>;
#define pb push_back
#define sz(a) (int)a.size()
#define all(a) begin(a),end(a)

vi who_wins(vi a, vi r, vi u, vi v) {
	vi ans(sz(a),0), V;
	for(int i = 0; i < sz(u); i++){
		if(u[i]!=v[i]) r[u[i]]=0;
		else V.pb(u[i]);
	}
	V.pb(-1); sort(all(V));
	for(int i = 1; i < sz(V); i++){
		if(r[V[i-1]]){
			for(int j = V[i-1]+1; j <= V[i]; j++) ans[j]=1;
		}
	}
	return ans;
}
# Verdict Execution time Memory Grader output
1 Incorrect 3 ms 596 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 Incorrect 1 ms 212 KB 3rd lines differ - on the 2nd token, expected: '1', found: '0'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 4 ms 852 KB Output is correct
2 Correct 4 ms 852 KB Output is correct
3 Correct 4 ms 820 KB Output is correct
4 Incorrect 4 ms 812 KB 3rd lines differ - on the 1st token, expected: '1', found: '0'
5 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 4 ms 740 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 852 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 3 ms 596 KB 3rd lines differ - on the 14th token, expected: '1', found: '0'
2 Halted 0 ms 0 KB -