# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1040480 | prabhu_2020 | Arranging Tickets (JOI17_arranging_tickets) | C++14 | 2 ms | 6492 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.
/* WHY NOT ? */
// #pragma GCC target("popcnt")
#include <bits/stdc++.h>
using namespace std;
using namespace std::chrono;
#define endl '\n'
#define mn first
#define mnc second
#define int long long
const int inf = -1e18;
const int N = 200005;
int arr[N]; /* 1 - based indexing */
int seg[4*N],lazy[4*N];
void build(int node,int ss,int se){
if(ss == se){
seg[node] = arr[ss];
return;
}
int mid = (ss + se) / 2;
build(2 * node,ss,mid);
build(2 * node + 1,mid + 1,se);
seg[node] = max(seg[2*node],seg[2*node + 1]);
}
void update(int node,int ss,int se,int l,int r,int val){
if(lazy[node] != 0){
int dx = lazy[node];
lazy[node] = 0;
seg[node] += dx;
# | 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... |