# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
169367 | SamAnd | Bigger segments (IZhO19_segments) | C++17 | 147 ms | 18912 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 m_p make_pair
const int N = 500005;
int n;
int a[N];
long long p[N];
pair<int, long long> dp[N];
pair<int, long long> mer(const pair<int, long long>& l, const pair<int, long long>& r)
{
if (l.first > r.first)
return l;
if (l.first < r.first)
return r;
if (l.second < r.second)
return l;
return r;
}
int main()
{
scanf("%d", &n);
for (int i = 1; i <= n; ++i)
scanf("%d", &a[i]);
for (int i = 1; i <= n; ++i)
p[i] = p[i - 1] + a[i];
for (int i = 0; i < n; ++i)
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |