# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
122926 | Hideo | Coin Collecting (JOI19_ho_t4) | C++14 | 2 ms | 376 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>
using namespace std;
#define ll long long
#define pb push_back
#define mk make_pair
#define fr first
#define sc second
#define vi vector < int >
#define vl vector < ll >
#define pi pair < int, ll >
#define pii pair < int, pi >
#define vii vector < pi >
const int N = 3e5 + 7;
const int INF = 1e9 + 7;
int a[N][3];
int n;
ll ans;
void close (ll &v, int r){
if (v < 1){
ans += abs(1 - v);
v = 1;
}
if (v > r){
ans += abs(r - v);
v = r;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |