Submission #719181

#TimeUsernameProblemLanguageResultExecution timeMemory
719181HunterXDRace (IOI11_race)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); namespace definitions { typedef vector<int> vi; typedef vector<vi> vvi; typedef pair<int, int> pii; typedef vector<pii> vpii; typedef vector<vpii> vvpii; typedef unsigned int ui; typedef vector<ui> vui; typedef vector<vui> vvui; typedef long long ll; typedef vector<ll> vl; typedef vector<vl> vvl; typedef pair<ll, ll> pll; typedef vector<pll> vpll; typedef vector<vpll> vvpll; typedef unsigned long long ull; typedef vector<ull> vull; typedef vector<vull> vvull; typedef long double dl; typedef vector<dl> vdl; typedef vector<vdl> vvdl; typedef pair<dl, dl> pdl; typedef vector<pdl> vpdl; typedef vector<vpdl> vvpdl; typedef vector<bool> vb; typedef vector<vb> vvb; typedef pair<bool, bool> pbb; typedef vector<pbb> vpbb; typedef vector<vpbb> vvpbb; typedef vector<char> vc; typedef vector<vc> vvc; typedef pair<char, char> pcc; typedef vector<pcc> vpcc; typedef vector<vpcc> vvpcc; typedef vector<string> vs; typedef vector<vs> vvs; typedef pair<string, string> pss; typedef vector<pss> vpss; typedef vector<vpss> vvpss; #define f first #define s second #define pb push_back #define pf push_front #define pob pop_back #define pof pop_front template <class T> using ptr = T *; #define all(x) begin(x), end(x) } // namespace definitions using namespace definitions; namespace stream { istream &operator>>(istream &in, __int128_t &x) { x = 0; bool neg = false; while (in.peek() == '-') neg = !neg, in.get(); while (in.peek() >= '0' && in.peek() <= '9') x = x * 10 + in.get() - '0'; if (neg) x *= -1; return in; } ostream &operator<<(ostream &out, const __int128_t &x) { ostream::sentry s(out); if (!s) return out; __uint128_t tmp = x < 0 ? -x : x; char buffer[128], *d = std::end(buffer); do { --d, *d = "0123456789"[tmp % 10], tmp /= 10; } while (tmp != 0); if (x < 0) --d, *d = '-'; int len = std::end(buffer) - d; if (out.rdbuf()->sputn(d, len) != len) out.setstate(std::ios_base::badbit); return out; } template <typename T1, typename T2> istream &operator>>(istream &in, pair<T1, T2> &x) { in >> x.first >> x.second; return in; } template <typename T1, typename T2> ostream &operator<<(ostream &out, const pair<T1, T2> &x) { out << x.first << " " << x.second; return out; } template <typename T> istream &operator>>(istream &in, vector<T> &x) { for (auto &i : x) in >> i; return in; } template <typename T> ostream &operator<<(ostream &out, const vector<T> &x) { for (auto &i : x) out << i << " "; return out; } template <ostream &out = cout, typename... args> void print(args... extra) { ((out << extra), ...); } template <typename ptr, ostream &out = cout, typename... args> void itprint(ptr itl, ptr itr, args... extra) { for (; itl != itr; ++itl) out << *itl, ((out << extra), ...); } } // namespace stream using namespace stream; namespace math { // needs __int128_t stoi128(const string &ss) { __int128_t x = 0; bool neg = false; for (auto ch : ss) { if (ch == '-') neg = !neg; if (ch >= '0' && ch <= '9') x = x * 10 - '0'; } if (neg) x *= -1; return x; } // constants const int64_t p1e9 = 1e9 + 7; const int64_t p998 = 998244353; const int32_t p_int32 = 65537; const int64_t p_int64 = 4294967311; const __int128_t p_int128 = stoi128("18446744073709551629"); const int32_t infi = INT32_MAX >> 2; const int64_t infl = INT64_MAX >> 2; const long double pi = acos((long double)-1); // basic operations template <auto mod, typename V> auto pos_mod(V val) { return (val % mod + mod) % mod; } template <typename H, typename... Args> auto add(H head, Args... args) { return ((head += args), ...); } template <auto mod, typename H, typename... Args> auto add(H head, Args... args) { return ((head %= mod, head += (args % mod)), ...) % mod; } template <typename H, typename... Args> auto multi(H head, Args... args) { return ((head *= args), ...); } template <auto mod, typename H, typename... Args> auto multi(H head, Args... args) { return ((head %= mod, head *= (args % mod)), ...) % mod; } template <typename A, typename B> auto binpow(A a, B b) { auto ans = A(1); for (; b; b >>= 1, a = multi(a, a)) if (b & 1) ans = multi(ans, a); return ans; } template <auto mod, typename A, typename B> auto binpow(A a, B b) { auto ans = A(1); for (; b; b >>= 1, a = multi<mod>(a, a)) if (b & 1) ans = multi<mod>(ans, a); return ans; } // gcd template <typename A, typename... Args> auto gcd(A a, Args... args) { return ((a = __gcd(a, args)), ...); } template <typename A, typename B> auto gcd_expand(A a, B b) { if (!a || !b) return (vector<B>){a ? 1 : 0, b ? 1 : 0, a ? a : b}; auto gc = gcd_expand(b % a, a); return (vector<B>){gc[1] - (b / a) * gc[0], gc[0], gc[2]}; } // modular inverse template <auto mod, typename A> auto inv_mod(A a) { return pos_mod<mod>(gcd_expand(a, mod)[0]); } template <auto pmod, typename A> auto inv_modp(A a) { return binpow<pmod>(a, pmod - 2); } // combinatorics template <typename A> auto factorial(A a) { auto ans = A(1); for (A i = 2; i <= a; ++i) ans = multi(ans, i); return ans; } template <auto mod, typename A> auto factorial(A a) { auto ans = A(1); for (A i = 2; i <= a; ++i) ans = multi<mod>(ans, i); return ans; } template <auto mod, typename A, typename B> auto combi(A a, B b) { auto res = A(1); for (B i = 1; i <= b; ++i) res = multi<mod>(res, a - i + 1, inv_mod<mod>(i)); return res; } template <typename A, typename B, typename P> auto combi_modp(A a, B b, P pmod) { auto res = P(1); for (B i = 1; i <= b; ++i) res = multi<pmod>(res, a - i + 1, inv_modp<pmod>(i)); return res; } } // namespace math using namespace math; namespace stl { template <class T> using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; template <class T> using ordered_multiset = tree<T, null_type, less_equal<T>, rb_tree_tag, tree_order_statistics_node_update>; } // namespace stl using namespace stl; namespace constants { const string YES = "YES"; const string yes = "yes"; const string NO = "NO"; const string no = "no"; const char nd = '\n'; const int dt_size = 8; const int dtx[] = {1, 1, 0, -1, -1, -1, 0, 1}; const int dty[] = {0, 1, 1, 1, 0, -1, -1, -1}; } // namespace constants using namespace constants; void solve(); void presolve(int t = 1) { if (t == -1) { cin >> t; while (t-- > 0) solve(); return; } while (t-- > 0) solve(); } signed main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); presolve(); } int best_path(int n, int k, int h[][2], int l[]) { return -1; } void solve() { }

Compilation message (stderr)

/usr/bin/ld: /tmp/ccIeKSM8.o: in function `main':
race.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/cccQh3jb.o:grader.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status