Submission #114381

# Submission time Handle Problem Language Result Execution time Memory
114381 2019-06-01T07:00:04 Z E869120 Friend (IOI14_friend) C++14
16 / 100
3 ms 384 KB
#include "friend.h"
#include <bits/stdc++.h>
using namespace std;

// Find out best sample
int findSample(int n,int confidence[],int host[],int protocol[]){
	int bit = 0;
	for (int i = 1; i <= n - 1; i++) bit |= (1 << protocol[i]);
	
	if (bit == 1) {
		// Subtask 4.
		
	}
	if (bit == 2) {
		// Subtask 2.
		int sum = 0; for (int i = 0; i < n; i++) sum += confidence[i];
		return sum;
	}
	if (bit == 4) {
		// Subtask 3.
		int sum = 0; for (int i = 0; i < n; i++) sum = max(sum, confidence[i]);
		return sum;
	}
	if (n <= 10) {
		// Subtask 5.
		
	}
	return -1;
}
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 384 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2 ms 384 KB Output is correct
2 Correct 2 ms 384 KB Output is correct
3 Correct 2 ms 384 KB Output is correct
4 Correct 2 ms 384 KB Output is correct
5 Correct 2 ms 384 KB Output is correct
6 Correct 2 ms 384 KB Output is correct
7 Correct 2 ms 384 KB Output is correct
8 Correct 2 ms 384 KB Output is correct
9 Correct 2 ms 384 KB Output is correct
10 Correct 2 ms 384 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 384 KB Output is correct
2 Correct 2 ms 384 KB Output is correct
3 Correct 2 ms 384 KB Output is correct
4 Correct 2 ms 384 KB Output is correct
5 Correct 3 ms 304 KB Output is correct
6 Correct 2 ms 384 KB Output is correct
7 Correct 2 ms 384 KB Output is correct
8 Correct 2 ms 384 KB Output is correct
9 Correct 3 ms 384 KB Output is correct
10 Correct 3 ms 384 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 384 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2 ms 384 KB Output is correct
2 Incorrect 2 ms 384 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 384 KB Output isn't correct
2 Halted 0 ms 0 KB -