# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1017552 | simona1230 | Friend (IOI14_friend) | C++17 | 1 ms | 2496 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
#include "friend.h"
using namespace std;
int c[100001];
int p[100001];
int t[100001];
int n;
int findSample(int N,int confidence[],int host[],int protocol[])
{
n=N;
int sum=0,maxx=0;
for(int i=0;i<n;i++)
{
t[i]=protocol[i];
//cout<<"- "<<t[i]<<endl;
c[i]=confidence[i];
p[i]=host[i];
sum+=c[i];
maxx=max(maxx,c[i]);
}
//cout<<sum<<endl;
bool o1=1;
for(int i=1;i<n;i++)
if(t[i]!=1)o1=0;
//cout<<o1<<endl;
if(o1==1)return sum;
bool o2=1;
for(int i=1;i<n;i++)
if(t[i]!=2)o2=0;
if(o2==1)return maxx;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |