# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
757915 |
2023-06-14T01:19:36 Z |
jer033 |
Fruits (NOI22_fruits) |
C++17 |
|
84 ms |
3448 KB |
#include <algorithm>
#include <iostream>
int assigned[400005];
long long costs[400005];
long long answer[400005];
using namespace std;
int main()
{
int n;
cin >> n;
int subtwo=1;
for (int i=1; i<=n; i++)
{
cin >> costs[i];
if (costs[i]>0)
subtwo=0;
}
if (subtwo)
{
answer[0]=0;
for (int i=1; i<=n; i++)
{
cin >> costs[i];
answer[i]=answer[i-1]+costs[i];
cout << answer[i];
if (i!=n)
cout << ' ';
else
cout << '\n';
}
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
212 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
84 ms |
3448 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |