Submission #1193740

#TimeUsernameProblemLanguageResultExecution timeMemory
1193740h1440Stations (IOI20_stations)C++20
0 / 100
0 ms416 KiB
#include "stations.h" #include <bits/stdc++.h> #define fore(i,a,b) for(lli i = (a), abcdxd = (b); i < abcdxd; i++) #define sz(s) (lli((s).size())) #define all(v) (v).begin(), (v).end() #define pb push_back using namespace std; typedef int lli; typedef vector<lli> vi; // const lli N = 1e3 + 5; // vector<vi> adj; // vi tk; // lli tim; // void dfs(lli u, lli p, lli w){ // if (w == 0) tk[u] = tim++; // for(auto & i : adj[u]) if (i != p) dfs(i, u, 1-w); // if (w == 1) tk[u] = tim++; // // cout << u << ": " << tim << endl; // } std::vector<int> label(int n, int k, std::vector<int> u, std::vector<int> v) { // tk.resize(n); // adj.resize(n+5); // fore(i,0,n-1){ // lli a = u[i], b = v[i]; // adj[a].pb(b); // adj[b].pb(a); // } // tim = 0; // // dfs(1, -1, 0); return {}; } int find_next_station(int s, int t, std::vector<int> c) { // if (s < c[0]){ // c.pb(s); sort(all(c)); // fore(i,0,sz(c)-2) if (c[i] < t and t <= c[i+1]) return c[i+1]; // return c[sz(c)-1]; // } // else{ // c.pb(s); sort(all(c)); // fore(i,1,sz(c)-1) if (c[i] <= t and t < c[i+1]) return c[i]; // return c[0]; // } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...