# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
32165 | imeimi2000 | Last supper (IOI12_supper) | C++14 | 116 ms | 17104 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 "advisor.h"
#include <vector>
#include <queue>
using namespace std;
typedef long long llong;
static vector<bool> used(100000, false);
static int nxt[100000];
static int pos[100000];
struct col {
int color;
int next;
bool operator<(const col &x) const {
return next < x.next;
}
};
static priority_queue<col> pq;
static vector<int> work[100000];
static int top[100000];
void ComputeAdvice(int *c, int n, int k, int m) {
for (int i = 0; i < n; ++i) pos[i] = -1, nxt[i] = n;
for (int i = 0; i < n; ++i) {
if (pos[c[i]] == -1) {
pos[c[i]] = i;
if (c[i] < k)
pq.push({ c[i], i });
}
Compilation message (stderr)
# | 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... |