Submission #922014

# Submission time Handle Problem Language Result Execution time Memory
922014 2024-02-04T17:52:55 Z Macker Friend (IOI14_friend) C++14
0 / 100
1 ms 348 KB
#include "friend.h"
#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
#define all(v) v.begin(), v.end()
// Find out best sample
int findSample(int n,int confidence[],int host[],int protocol[]){
	bool no0 = 0, no1 = 0, no2 = 0;
	for (int i = 1; i < n; i++) {
		if(protocol[i] == 0) no0 = false;
		if(protocol[i] == 1) no1 = false;
		if(protocol[i] == 2) no2 = false;
	}
	if(no0 && no2){ // no edges
		int res = 0;
		for (int i = 0; i < n; i++) {
			res += confidence[i];
		}
		return res;
	}
	if(no0 && no1){ // fully conected
		int res = 0;
		for (int i = 0; i < n; i++) {
			res = max(res, confidence[i]);
		}
		return res;
	}
	if(no1 && no2){ // tree

	}
	if(n <= 15){ // brute force

	}
	return -1;
}
# 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 Incorrect 0 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 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 Incorrect 0 ms 348 KB Output isn't correct
2 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 -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -