Submission #874068

# Submission time Handle Problem Language Result Execution time Memory
874068 2023-11-16T08:44:28 Z yhkhoo Friend (IOI14_friend) C++17
16 / 100
1 ms 604 KB
#include "friend.h"

// Find out best sample
int findSample(int n,int confidence[],int host[],int protocol[]){
	int ans=0;
	bool st1=true,st2=true,st3=true,st4=true;
	if(n>10)
		st1=false;
	for(int i=1; i<n; i++){
		if(protocol[i] == 0){
			st2=false;
			st3=false;
		}
		else if(protocol[i] == 1){
			st3=false;
			st4=false;
		}
		else{
			st2=false;
			st4=false;
		}
	}
	if(st2){
		for(int i=0; i<n; i++){
			ans += confidence[i];
		}
	}
	else if(st3){
		for(int i=0; i<n; i++){
			if(confidence[i] > ans){
				ans = confidence[i];
			}
		}
	}
	else if(st1){
	}
	else if(st4){
	}
	return ans;
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 372 KB Output is correct
3 Correct 0 ms 344 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 1 ms 604 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 ms 344 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 344 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 1 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Incorrect 0 ms 348 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -