답안 #295916

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
295916 2020-09-10T06:02:09 Z Muhammetali 장난감 기차 (IOI17_train) C++11
0 / 100
8 ms 768 KB
#include "train.h"
#include <bits/stdc++.h>
#define mp make_pair
#define f first
#define s second
#define sz(x) (int)(x).size()
#define rsz resize
#define ins insert
#define ft front()
#define bk back()
#define pf push_front
#define pb push_back
#define eb emplace_back
#define lb lower_bound
#define ub upper_bound
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int,int> pi;
typedef pair<ll,ll> pl;
typedef vector<int> vi;
typedef vector<bool> vb;
typedef vector<ll> vl;
typedef vector<pi> vpi;
typedef vector<pl> vpl;
const int N=2e5+1;
std::vector<int> who_wins(std::vector<int> a, std::vector<int> r, std::vector<int> u, std::vector<int> v)
{
	vi res;
	int mx=0;
	for (int i=0;i<sz(u);i++)
	{
		if (u[i]==v[i] && a[u[i]]==1 && r[u[i]]==1)
		{
			mx=max(mx,u[i]);
		}
	}
	for (int i=0;i<sz(a);i++)
	{
		if (mx>=i)
		{
			res.pb(1);
		}
		else
		{
			res.pb(0);
		}
	}
	return res;
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 4 ms 512 KB 3rd lines differ - on the 1st token, expected: '0', found: '1'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 256 KB 3rd lines differ - on the 1st token, expected: '0', found: '1'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 7 ms 768 KB 3rd lines differ - on the 1st token, expected: '0', found: '1'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 6 ms 640 KB 3rd lines differ - on the 2nd token, expected: '1', found: '0'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 8 ms 768 KB 3rd lines differ - on the 3rd token, expected: '1', found: '0'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 4 ms 512 KB 3rd lines differ - on the 1st token, expected: '0', found: '1'
2 Halted 0 ms 0 KB -