# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
510248 |
2022-01-14T20:52:23 Z |
salamhassan |
Nizin (COCI16_nizin) |
C++14 |
|
1000 ms |
20568 KB |
#include <bits/stdc++.h>
using namespace std;
int a[1000007],n,x,sum,ans;
int main()
{
cin>>n;
for (int i=0; i<n; i++)
{
cin>>a[i];
}
for (int i=0; i<n/2; i++)
{
cout<<i<<" "<<a[i]<<" "<<a[n-i-1]<<" "<<n<<endl;
if (a[i]==a[n-1-i])
{
continue;
}
else
{
if (a[i]>a[n-i-1])
{
a[n-i-2]+=a[n-i-1];
ans++;
}
else
{
a[i+1]+=a[i];
a[i]+=a[i+1]-a[i];
ans++;
i--;
}
}
}
cout<<ans;
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Incorrect |
0 ms |
204 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
204 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
5 ms |
332 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
420 ms |
6272 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1091 ms |
19500 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1096 ms |
20568 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1054 ms |
17320 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |