Submission #908971

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
9089712024-01-17 03:57:31zhasynCommuter Pass (JOI18_commuter_pass)C++14
15 / 100
2073 ms38340 KiB
#include <bits/stdc++.h>
#define pb push_back
#define pf push_front
using namespace std;
#define F first
#define S second
typedef long long ll;
#define pii pair <int, int>
#define pll pair <ll, ll>
typedef long double ld;
const ll N = 1e5 + 10;
const ll mod = 998244353;
ll um(ll a, ll b){
return ((1LL * a * b) % mod + mod) % mod;
}
ll subr(ll a, ll b){
return ((1LL * a - b) % mod + mod) % mod;
}
ll n, m, from, to, fir, sec;
ll d[N], dp[N], used[N];
vector <pll> q[N];
void dfs(int v){
used[v] = true;
for(auto u : q[v]){
if(d[u.F] + u.S == d[v]) dfs(u.F);
}
}
ll d1[N][2];
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

commuter_pass.cpp: In function 'void create()':
commuter_pass.cpp:37:10: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
   37 |     auto [place, v] = *st.begin();
      |          ^
commuter_pass.cpp: In function 'int main()':
commuter_pass.cpp:81:10: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
   81 |     auto [f, s] = *st.begin();
      |          ^
commuter_pass.cpp:82:10: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
   82 |     auto [place, v] = f;
      |          ^
commuter_pass.cpp:83:10: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
   83 |     auto [was, dir] = s;
      |          ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...