# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
617372 |
2022-08-01T11:02:53 Z |
Valenz |
Feast (NOI19_feast) |
C++14 |
|
188 ms |
5696 KB |
#include <bits/stdc++.h>
using namespace std;
#define int long long
signed main()
{
int n,k;
cin >> n >> k;
vector<int> a(n+1);
int ans=0,cur=0;
for(int i=1;i<=n;i++)
{
cin >> a[i];
cur+=a[i];
ans=max(ans,cur);
cur=max(cur,0LL);
}
cout << ans << '\n';
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
125 ms |
2576 KB |
Output is correct |
2 |
Correct |
116 ms |
2608 KB |
Output is correct |
3 |
Correct |
127 ms |
2644 KB |
Output is correct |
4 |
Correct |
139 ms |
2624 KB |
Output is correct |
5 |
Correct |
129 ms |
2600 KB |
Output is correct |
6 |
Correct |
115 ms |
2568 KB |
Output is correct |
7 |
Correct |
114 ms |
2564 KB |
Output is correct |
8 |
Correct |
115 ms |
2516 KB |
Output is correct |
9 |
Correct |
112 ms |
2572 KB |
Output is correct |
10 |
Correct |
127 ms |
2600 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
81 ms |
2576 KB |
Output is correct |
2 |
Correct |
92 ms |
2644 KB |
Output is correct |
3 |
Correct |
63 ms |
2576 KB |
Output is correct |
4 |
Incorrect |
68 ms |
2596 KB |
Output isn't correct |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
158 ms |
2620 KB |
Output is correct |
2 |
Correct |
147 ms |
5572 KB |
Output is correct |
3 |
Correct |
142 ms |
5628 KB |
Output is correct |
4 |
Correct |
188 ms |
5520 KB |
Output is correct |
5 |
Correct |
130 ms |
5624 KB |
Output is correct |
6 |
Correct |
121 ms |
5548 KB |
Output is correct |
7 |
Correct |
115 ms |
5596 KB |
Output is correct |
8 |
Correct |
131 ms |
5552 KB |
Output is correct |
9 |
Correct |
132 ms |
5696 KB |
Output is correct |
10 |
Correct |
116 ms |
5560 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Incorrect |
1 ms |
212 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Incorrect |
1 ms |
212 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Incorrect |
1 ms |
212 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
125 ms |
2576 KB |
Output is correct |
2 |
Correct |
116 ms |
2608 KB |
Output is correct |
3 |
Correct |
127 ms |
2644 KB |
Output is correct |
4 |
Correct |
139 ms |
2624 KB |
Output is correct |
5 |
Correct |
129 ms |
2600 KB |
Output is correct |
6 |
Correct |
115 ms |
2568 KB |
Output is correct |
7 |
Correct |
114 ms |
2564 KB |
Output is correct |
8 |
Correct |
115 ms |
2516 KB |
Output is correct |
9 |
Correct |
112 ms |
2572 KB |
Output is correct |
10 |
Correct |
127 ms |
2600 KB |
Output is correct |
11 |
Correct |
81 ms |
2576 KB |
Output is correct |
12 |
Correct |
92 ms |
2644 KB |
Output is correct |
13 |
Correct |
63 ms |
2576 KB |
Output is correct |
14 |
Incorrect |
68 ms |
2596 KB |
Output isn't correct |
15 |
Halted |
0 ms |
0 KB |
- |