Submission #753785

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
7537852023-06-06 02:40:52buihuynhtayCommuter Pass (JOI18_commuter_pass)C++14
100 / 100
298 ms17992 KiB
#include<bits/stdc++.h>
using namespace std;
#define Size(x) ((int)(x).size())
#define MASK(i) (1LL<<(i))
#define bit(mask, i) (((mask) >> (i)) & 1)
const long long inf = 1e18;
const int mod = 1e9 + 7;
const int N = 1e5 + 1;
template<class T1, class T2>
bool Min(T1 &a, T2 b){
if(a >= b){a = b; return true;}
return false;
}
int n, m, s, t, u, v;
bool vs[N];
long long minDist[N], minDistU[N], minDistV[N], dpU[N], dpV[N];
vector<pair<int,int>> graph[N];
#define pli pair<long long, int>
void dijkstra(int s, long long minDist[]){
for(int i = 1; i <= n; i++) minDist[i] = inf;
minDist[s] = 0;
priority_queue<pli, vector<pli>, greater<pli>> pq;
pq.push({minDist[s], s});
while(pq.empty() == 0){
long long du = pq.top().first;
int u = pq.top().second;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...