Submission #3450935
Source Code Expand
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; int A[4][110]; for(int i=1;i<=N;i++){cin >> A[1][i];} for(int i=1;i<=N;i++){cin >> A[2][i];} int S[N]; int ans=0; for(int i=1;i<=N;i++){ for(int j=1;j<=i;j++){S[i]+=A[1][j];} for(int k=i;k<=N;k++){S[i]+=A[2][k];} if(ans<S[i]){ans=S[i];} } cout << ans << endl; }
Submission Info
Submission Time | |
---|---|
Task | C - Candies |
User | iruka |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 388 Byte |
Status | WA |
Exec Time | 1 ms |
Memory | 256 KB |
Judge Result
Set Name | Sample | All | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 300 | ||||||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample01.txt, sample02.txt, sample03.txt, sample04.txt |
All | 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt, 11.txt, 12.txt, sample01.txt, sample02.txt, sample03.txt, sample04.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
01.txt | WA | 1 ms | 256 KB |
02.txt | WA | 1 ms | 256 KB |
03.txt | WA | 1 ms | 256 KB |
04.txt | WA | 1 ms | 256 KB |
05.txt | WA | 1 ms | 256 KB |
06.txt | WA | 1 ms | 256 KB |
07.txt | WA | 1 ms | 256 KB |
08.txt | WA | 1 ms | 256 KB |
09.txt | WA | 1 ms | 256 KB |
10.txt | WA | 1 ms | 256 KB |
11.txt | WA | 1 ms | 256 KB |
12.txt | WA | 1 ms | 256 KB |
sample01.txt | WA | 1 ms | 256 KB |
sample02.txt | AC | 1 ms | 256 KB |
sample03.txt | WA | 1 ms | 256 KB |
sample04.txt | WA | 1 ms | 256 KB |