# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
275196 | shrek12357 | Meandian (CEOI06_meandian) | C++14 | 5 ms | 384 KiB |
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;
typedef pair<int, int> pi;
#include "libmean.h"
int n, arr[166];
deque<int> Q;
void resolve(int a, int b, int c, int d, int e){
vector<pi> v;
v.emplace_back(Meandian(a, b, c, d), e);
v.emplace_back(Meandian(a, b, c, e), d);
v.emplace_back(Meandian(a, b, d, e), c);
v.emplace_back(Meandian(a, c, d, e), b);
v.emplace_back(Meandian(b, c, d, e), a);
sort(v.begin(), v.end());
int sum = 0;
for(int i=1; i<4; i++){
sum += v[i].first;
}
arr[v[2].second] = sum - 2 * v[2].first;
}
int main(){
n = Init();
memset(arr, -1, sizeof(arr));
for(int i=0; i<n; i++){
Q.push_back(i + 1);
}
while(Q.size() >= 5){
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |