# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
848517 | Naser | Overtaking (IOI23_overtaking) | C++17 | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
//#define int long long
#define endl '\n'
#define pii pair<int,int>
#define vint vector<int>
#define vpii vector<pii>
#define pb push_back
#define se second
#define fi first
#define all(x) x.begin(), x.end()
#define graph vector<vector<int>>
using namespace std;
const int N = (int)2e5 + 69;
const int mod = (int)1e4 + 7;
const int naser = 3999, tourist = 3816;
int power(int a, int b) { int ans = 1; while (b) { if (b % 2) ans *= a; a *= a; b /= 2; } return ans; }
int ex[1001][1001], ti[1001][1001], y, x, n, m;
vint tmp, t, w, s;
bool cmp(int a, int b) {
int aa = (y - t[a]) / (w[a] - x);
int bb = (y - t[b]) / (w[b] - x);
if (min(aa, bb) < 0)
return aa > bb;
return aa < bb;
}
void init(vint S) {
t = T;
w = W;
s = S;