Submission #115299

# Submission time Handle Problem Language Result Execution time Memory
115299 2019-06-06T16:42:42 Z faustaadp Friend (IOI14_friend) C++17
0 / 100
2 ms 512 KB
#include "friend.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;
// Find out best sample
ll i,n,b[3],a[101010],jum,ma;
int findSample(int n,int confidence[],int host[],int protocol[])
{
	//int ans=10;
	for(i=1;i<n;i++)
	{
		b[protocol[i]]=1;
		a[i]=confidence[i];
		jum+=a[i];
		ma=max(ma,a[i]);
	}
	//if(b[0]==0&&b[1]==1&&b[2]==0)
		return jum;
	if(b[0]==0&&b[1]==0&&b[2]==1)
		return ma;
}
# Verdict Execution time Memory Grader output
1 Correct 2 ms 384 KB Output is correct
2 Correct 2 ms 384 KB Output is correct
3 Incorrect 2 ms 256 KB Output isn't correct
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 384 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 512 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2 ms 384 KB Output is correct
2 Incorrect 2 ms 384 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 256 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2 ms 384 KB Output is correct
2 Correct 2 ms 384 KB Output is correct
3 Incorrect 2 ms 384 KB Output isn't correct
4 Halted 0 ms 0 KB -