# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
641250 | lto5 | Med (COCI22_med) | C++14 | 15 ms | 376 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;
string s[505];
int b[505][10];
int tot[505];
int n;
int idx[505];
bool cmp (const int& x, const int& y) {
if (tot[x] != tot[y])
return tot[x] > tot[y];
return s[x] < s[y];
}
int find_best (int cur_idx) {
tot[cur_idx] += 500;
sort(idx + 1, idx + 1 + n, cmp);
tot[cur_idx] -= 500;
for (int i = 1; i <= n; i++) {
if (idx[i] == cur_idx) {
return i;
}
}
}
int find_worst (int cur_idx) {
for (int i = 1; i <= n; i++) {
if (i != cur_idx)
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |