QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#65413 | #5122. Strange Sum | ressoa | WA | 2ms | 3408kb | C++17 | 439b | 2022-11-30 15:35:01 | 2022-11-30 15:35:05 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
#define ll long long
void solve(){
int n;
cin>>n;
ll a[n+1];
for(int i=1;i<=n;i++)cin>>a[i];
ll mx=max(0ll,a[0]);
for(int i=1;i<n;i++)mx=max(mx,a[i]+a[i+1]);
cout<<mx<<'\n';
return void();
}
int main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
int t=1;
// cin>>t;
while(t--){
solve();
}
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 2ms
memory: 3352kb
input:
4 1 4 3 2
output:
7
result:
ok 1 number(s): "7"
Test #2:
score: -100
Wrong Answer
time: 2ms
memory: 3408kb
input:
3 -10 -10 -10
output:
94659612431856
result:
wrong answer 1st numbers differ - expected: '0', found: '94659612431856'