Submission #872902

# Submission time Handle Problem Language Result Execution time Memory
872902 2023-11-14T04:38:36 Z vjudge1 Labels (NOI20_labels) C++17
0 / 100
58 ms 3384 KB
#include <bits/stdc++.h>
using namespace std;

typedef long long ll;

int main(){
	int N;
	cin>>N;
	int arr[N];
	arr[0] = 1;
	int add=0;
	for (int i=1; i<N; i++){
		int temp;
		cin>>temp;
		arr[i] = arr[i-1]+temp;
		if (arr[i]<0) add = max(0-arr[i], add);	
	}
	
	for (int j=0; j<N; j++) cout<<add+arr[j]<<' ';
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 50 ms 3372 KB Output is correct
2 Correct 0 ms 344 KB Output is correct
3 Incorrect 58 ms 3384 KB Output isn't correct
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -