# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
74346 | khsoo01 | Alternative Mart (FXCUP2_mart) | C++11 | 546 ms | 143416 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>
#define X first
#define Y second
using namespace std;
typedef pair<int,int> pii;
const int inf = 1e9;
int n, m, k, q, c[50005], vis[50005], ts;
pii d[50005][12];
vector<pii> adj[50005];
priority_queue<pair<pii,int> > pq;
bool upd (int I, pii V) {
for(int i=0;i<11;i++) {
if(d[I][i] < V) {
pii T = d[I][i];
d[I][i] = V;
for(int j=i+1;j<11;j++) {
if(T.Y == V.Y) return true;
swap(d[I][j], T);
}
return true;
}
if(d[I][i].Y == V.Y) return false;
}
return false;
}
int main()
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |