Submission #114027

# Submission time Handle Problem Language Result Execution time Memory
114027 2019-05-29T16:10:14 Z faustaadp Simurgh (IOI17_simurgh) C++17
0 / 100
2 ms 384 KB
#include "simurgh.h"
#include<bits/stdc++.h>
typedef long long ll;
#define pb push_back
#define mp make_pair
#define fi first
#define se second
using namespace std;
ll n,m,a[1010101],i;
ll cek(ll aa,ll bb)
{
	std::vector<int> tom,tom1,tom2;
	ll ii,sisa=n-2;
	for(ii=0;ii<m;ii++)
		if(ii!=aa&&ii!=bb&&sisa)
		{
			tom.pb(ii);
			sisa--;
		}
	tom1=tom;
	tom2=tom;
	tom1.pb(aa);
	tom2.pb(bb);
	return count_common_roads(tom2)-count_common_roads(tom1);
}
std::vector<int> find_roads(int N, std::vector<int> u, std::vector<int> v) 
{
	n=N;
	m=u.size();
	std::vector<int> r(n - 1);
	for(int i = 0; i < n - 1; i++)
		r[i] = i;
	int common = count_common_roads(r);
	if(common == n - 1)
		return r;
	ll ma=0;
	for(i=1;i<m;i++)
	{
		a[i]=a[i-1]+cek(i-1,i);
		ma=max(ma,a[i]);
	}
	r.clear();
	for(i=0;i<m;i++)
		if(a[i]==ma)
			r.pb(i);
	return r;
}
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 256 KB WA in grader: NO
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 256 KB WA in grader: NO
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 256 KB WA in grader: NO
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2 ms 384 KB correct
2 Incorrect 2 ms 384 KB WA in grader: NO
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 256 KB WA in grader: NO
2 Halted 0 ms 0 KB -