# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
129333 | antimirage | Friend (IOI14_friend) | C++14 | 0 ms | 0 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 "friend.h"
#include "grader.cpp"
#include <bits/stdc++.h>
#define fr first
#define sc second
#define mk make_pair
#define pb push_back
#define all(s) s.begin(), s.end()
using namespace std;
int findSample(int n, int val[], int batya[], int type[]) {
int ans = 0;
if (type[1] == 1) {
for (int i = 1; i < n; i++) {
ans += val[i];
}
}
else {
for (int i = 1; i < n; i++) {
ans = max(ans, val[i]);
}
}
return ans;
}