This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
// Subtask 3
#include <bits/stdc++.h>
using namespace std;
int findSample(int n, int confidence[], int host[], int protocol[]) {
bool subtask2 = 1, subtask3 = 1;
for (int i=1; i<n; i++) {
if (protocol[i] != 1) subtask2 = 0;
if (protocol[i] != 2) subtask3 = 0;
}
if (subtask2) {
int ans=0;
for (int i=0; i<n; i++) ans += confidence[i];
return ans;
}
if (subtask3) {
int ans=0;
for (int i=0; i<n; i++) ans = max(ans, confidence[i]);
return ans;
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |