| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1327268 | gabyferaq | Feast (NOI19_feast) | C++20 | 93 ms | 2740 KiB |
#include <bits/stdc++.h>
#define INI cin.tie(0)->sync_with_stdio(0);
#define endl '\n';
#define query int c;cin>>c;while(c--)
typedef long long ll;
typedef unsigned long long ull;
using namespace std;
void solve()
{
ll n,sum,res; cin>>n;
vector<ll> ter(n);
for(ll i=0;i<n;cin>>ter[i++]);
res=ter[0];
sum=ter[0];
for(ll i=1;i<n;i++)
{
sum=max(ter[i],sum+ter[i]);
res=max(res,sum);
}
cout<<res<<endl;
}
int main()
{
//query
solve();
}
| # | 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... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
