Submission #853970

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
8539702023-09-25 17:26:54trytovoiCommuter Pass (JOI18_commuter_pass)C++14
40 / 100
146 ms15084 KiB
#include <bits/stdc++.h>
using namespace std;
template<typename T> bool ckmin(T& x, const T& y) { return x > y ? x = y, 1 : 0; }
template<typename T> bool ckmax(T& x, const T& y) { return x < y ? x = y, 1 : 0; }
const long long INF = (long long) 1e18;
const int MAX_NODE = (int) 1e5 + 5;
const int MAX_EDGE = (int) 2e5 + 5;
int n, m;
int S, T, U, V;
vector<pair<int, int>> adj[MAX_NODE];
struct Data {
int u;
long long w;
Data(int _u = 0, long long _w = 0) {
u = _u; w = _w;
}
bool operator < (const Data& other) const {
return w > other.w;
}
};
namespace SUBTASK_1 {
void dijkstra(int s, vector<long long>& dist) {
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

commuter_pass.cpp: In function 'void SUBTASK_1::dijkstra(int, std::vector<long long int>&)':
commuter_pass.cpp:34:18: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
   34 |             auto [u, du] = Q.top(); Q.pop();
      |                  ^
commuter_pass.cpp:37:23: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
   37 |             for (auto [v, dv] : adj[u]) {
      |                       ^
commuter_pass.cpp: In function 'void SUBTASK_3::solve()':
commuter_pass.cpp:69:23: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
   69 |             for (auto [v, w] : adj[i]) dist[i][v] = dist[v][i] = w;
      |                       ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...