# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
307778 | b00n0rp | Handcrafted Gift (IOI20_gift) | C++17 | 223 ms | 24980 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 "gift.h"
#include<bits/stdc++.h>
using namespace std;
#define REP(i,n) for(int i = 0; i < n; i ++)
#define FOR(i,a,b) for(int i = a; i < b; i ++)
#define FORD(i,a,b) for(int i = a; i >= b; i --)
#define vi vector<int>
#define remin(a,b) a = min(a,b)
#define remax(a,b) a = max(a,b)
const int MX = 500005;
int lft[MX][3];
int dp[MX];
int pref[MX];
int breakable[MX];
int construct(int n, int r, vi a, vi b, vi x) {
REP(i,n+1){
lft[i][1] = i;
lft[i][2] = 0;
}
REP(i,r){
a[i]++;
b[i]++;
if(x[i] == 1){
remin(lft[b[i]][1],a[i]);
pref[a[i]]++;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |