# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1102535 | vjudge1 | Travelling Merchant (CCO21_day2problem1) | C++17 | 111 ms | 18760 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <iostream>
#include <vector>
#include <queue>
#include <algorithm>
using namespace std;
struct EDGE {
int x, y, z, t;
} e[200005];
bool cmp(EDGE aa, EDGE bb) {
return aa.z < bb.z;
}
vector<int> gg[200005];
int d[200005], da[200005], f[200005];
int main() {
ios::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
int n, m;
cin >> n >> m;
for (int i = 1; i <= m; i++) {
int x, y, z, t;
cin >> x >> y >> z >> t;
d[x]++;
e[i] = {x, y, z, t};
}
sort(e + 1, e + m + 1, cmp);
queue<int> q;
for (int i = 1; i <= m; i++) {
gg[e[i].y].push_back(i);
}
for (int i = 1; i <= n; i++) {
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |