# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
870054 | ThommyDB | Closing Time (IOI23_closing) | C++17 | 163 ms | 29804 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;
vector<vector<pair<int, int>>> adj;
vector<bool> visited;
vector<long long> distX, distY;
void dfs(int curr, long long d, vector<long long> &dist){
visited[curr] = true;
dist[curr] =d;
for(pair<int, int> u : adj[curr]){
if(!visited[u.first]){
dfs(u.first, d+u.second, dist);
}
}
}
int solve(int N, long long K, int mx){
int ans = 0;
priority_queue<pair<int, int>> q;
for(int i = 0; i < N; i++){
q.push({min(distX[i], distY[i]), i});
}
vector<int> cnt(N, 0);
while(!q.empty()){
while(!q.empty() && (K < q.top().first || cnt[q.top().second] > mx-1)) q.pop();
if(q.empty()) break;
# | 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... |
# | 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... |