QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#65411 | #5122. Strange Sum | ressoa | WA | 2ms | 3412kb | C++17 | 429b | 2022-11-30 15:31:05 | 2022-11-30 15:31:06 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
#define ll long long
void solve(){
int n;
cin>>n;
int a[n+1];
int mx=0;
for(int i=1;i<=n;i++)cin>>a[i];
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;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 2ms
memory: 3324kb
input:
4 1 4 3 2
output:
7
result:
ok 1 number(s): "7"
Test #2:
score: 0
Accepted
time: 2ms
memory: 3344kb
input:
3 -10 -10 -10
output:
0
result:
ok 1 number(s): "0"
Test #3:
score: 0
Accepted
time: 2ms
memory: 3320kb
input:
2 -394027216 -486855090
output:
0
result:
ok 1 number(s): "0"
Test #4:
score: 0
Accepted
time: 2ms
memory: 3412kb
input:
3 -357735986 584247758 118625500
output:
702873258
result:
ok 1 number(s): "702873258"
Test #5:
score: -100
Wrong Answer
time: 0ms
memory: 3328kb
input:
100 56104366 -596757183 -563118094 -754585503 -108568019 320836846 955898372 745823264 942812454 -13940121 510253952 538293489 -683482556 159329401 -488586607 718665544 -560503132 167141318 -121480647 873802880 -642178792 64201005 -768929811 383561940 -993409166 441561051 -205099595 858985447 181520...
output:
1841504015
result:
wrong answer 1st numbers differ - expected: '1932124867', found: '1841504015'