# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1172038 | coolboy19521 | Bigger segments (IZhO19_segments) | C++20 | 0 ms | 328 KiB |
#include "bits/stdc++.h"
#define mxN 500005
using namespace std;
long long pr[mxN];
int a[mxN];
int main(){
int N;
cin >> N;
for (int i = 1; i <= N; i ++)
cin >> a[i];
priority_queue<tuple<long long,int,int>> pq;
int aux = 0, ans = 0;
pair<int,int> bs = {0, 0};
for (int i = 1; i <= N; i ++){
pr[i] = aux += a[i];
for(;;){
if (pq.empty()) break;
auto [sm, cn, ix] = pq.top();
sm = -sm;
# | 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... |