# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
708507 | finn__ | Robot (JOI21_ho_t4) | C++17 | 618 ms | 65956 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;
constexpr size_t N = 100000;
vector<tuple<size_t, size_t, size_t>> g[N];
map<size_t, size_t> ccost[N], f[N];
size_t d[N];
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
size_t n, m;
cin >> n >> m;
for (size_t i = 0; i < m; i++)
{
size_t u, v, c, p;
cin >> u >> v >> c >> p;
g[u - 1].emplace_back(v - 1, c, p);
g[v - 1].emplace_back(u - 1, c, p);
ccost[u - 1][c] += p;
ccost[v - 1][c] += p;
}
auto compare_second = [](tuple<size_t, size_t, size_t> const &a,
tuple<size_t, size_t, size_t> const &b)
{ return get<1>(a) > get<1>(b); };
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |