#include<bits/stdc++.h>
#include "friend.h"
using namespace std;
int findSample(int n,int confidence[],int host[],int protocol[])
{
int sum=confidence[0],maxi=confidence[0];
bool one=1,two=1;
for(int i=1;i<n;i++)
{
if(protocol[i]!=1)one=0;
if(protocol[i]!=2)two=0;
sum=sum+confidence[i];
maxi=max(maxi,confidence[i]);
}
if(one)return sum;
if(two)return maxi;
assert(0==1);
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
3 ms |
576 KB |
Execution killed with signal 11 (could be triggered by violating memory limits) |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
632 KB |
Output is correct |
2 |
Correct |
2 ms |
632 KB |
Output is correct |
3 |
Correct |
3 ms |
704 KB |
Output is correct |
4 |
Correct |
3 ms |
752 KB |
Output is correct |
5 |
Correct |
3 ms |
772 KB |
Output is correct |
6 |
Correct |
3 ms |
780 KB |
Output is correct |
7 |
Correct |
3 ms |
808 KB |
Output is correct |
8 |
Correct |
2 ms |
812 KB |
Output is correct |
9 |
Correct |
2 ms |
836 KB |
Output is correct |
10 |
Correct |
3 ms |
836 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
3 ms |
836 KB |
Output is correct |
2 |
Correct |
3 ms |
836 KB |
Output is correct |
3 |
Correct |
2 ms |
836 KB |
Output is correct |
4 |
Correct |
2 ms |
836 KB |
Output is correct |
5 |
Correct |
3 ms |
836 KB |
Output is correct |
6 |
Correct |
2 ms |
836 KB |
Output is correct |
7 |
Correct |
2 ms |
836 KB |
Output is correct |
8 |
Correct |
2 ms |
836 KB |
Output is correct |
9 |
Correct |
2 ms |
836 KB |
Output is correct |
10 |
Correct |
3 ms |
836 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
2 ms |
836 KB |
Execution killed with signal 11 (could be triggered by violating memory limits) |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
900 KB |
Output is correct |
2 |
Runtime error |
3 ms |
900 KB |
Execution killed with signal 11 (could be triggered by violating memory limits) |
3 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
3 ms |
956 KB |
Execution killed with signal 11 (could be triggered by violating memory limits) |
2 |
Halted |
0 ms |
0 KB |
- |