| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 320872 | daniel920712 | 친구 (IOI14_friend) | C++14 | 1 ms | 364 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 "friend.h"
#include <iostream>
// Find out best sample
using namespace std;
int what[100005];
int findSample(int n,int confidence[],int host[],int protocol[])
{
int ans=0,i,x=0,y=0;
what[0]=0;
x+=confidence[0];
if(protocol[1]==1) ans+=confidence[0];
for(i=1;i<n;i++)
{
if(protocol[i]==1) ans+=confidence[i];
else
{
what[i]=1-what[host[i]];
if(what[i]==0) x+=confidence[i];
else y+=confidence[i];
ans=max(ans,max(x,y));
}
}
return ans;
}
| # | 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... | ||||
