Submission #1022963

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
10229632024-07-14 08:03:04sinatbtfardRobot (JOI21_ho_t4)C++17
100 / 100
1534 ms144380 KiB
#include <bits/stdc++.h>
#define ll long long
#define F first
#define S second
using namespace std;
struct edge{
int u, c;
ll p;
edge(int _u, int _c, ll _p) : u(_u), c(_c), p(_p) {}
};
int n, m;
vector <map <int, vector <edge>>> adj;
vector <map <int, ll>> dist, sum;
set <pair <ll, pair <int, int>>> s;
void dijkstra (){
s.insert({0, {1, 0}});
while (s.size()) {
ll d = (*s.begin()).F;
auto [v, c] = (*s.begin()).S;
s.erase(s.begin());
if (dist[v].count(c) && dist[v][c] <= d)
continue;
dist[v][c] = d;
if (!c){
for (auto Color : adj[v]) {
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...