Submission #604617

#TimeUsernameProblemLanguageResultExecution timeMemory
604617gagik_2007Stations (IOI20_stations)C++17
0 / 100
971 ms604 KiB
#include "stations.h" #include <iostream> #include <algorithm> #include <string> #include <vector> #include <cmath> #include <ctime> #include <set> #include <map> #include <stack> #include <queue> #include <deque> #include <limits> #include <iomanip> #include <unordered_set> #include <unordered_map> #include <random> using namespace std; typedef long long ll; typedef long double ld; typedef ll itn; #define ff first #define ss second ll n; ll cnt[1007]; vector<int>g[1007]; vector<int> label(int n, int k, vector<int> u, vector<int> v) { vector<int> lbl(n); lbl[0] = 0; for (int i = 1; i < n; i++) { lbl[i] = i; } return lbl; } int find_next_station(int s, int t, vector<int> c) { if (c.size() == 1)return c[0]; if (s == 0) { if (t == 2)return 2; return 1; } if (s == 1) { if (t == 0)return 0; if (t == 2)return 0; if (t == 4)return 4; return 3; } if (s % 2 == 0) { if (s == 2)return 0; return s - 3; } if (t == s + 3)return t; if (t - 2 >= s) { return s + 2; } return s - 2; }
#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...