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>
using namespace std;
int N,*C,*H,*P;
int subtask2()
{
int zbir=0;
for (int i=0; i<N; i++)
zbir+=C[i];
return zbir;
}
int subtask3()
{
int maxx=-1;
for (int i=0; i<N; i++)
{
if(C[i]>maxx)
maxx=C[i];
}
return maxx;
}
int findSample(int n, int confidence[], int host[], int protocol[])
{
int i;
N=n;
C=confidence;
H=host;
P=protocol;
for(i=2; i<N; i++)
if(protocol[i-1]!=protocol[i])
break;
if(i>=N)
{
if(protocol[1]==1)
{
return subtask2();
}
if(protocol[1]==2)
return subtask3();
}
return 0;
}
# | 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... |