Submission #510251

# Submission time Handle Problem Language Result Execution time Memory
510251 2022-01-14T20:58:16 Z salamhassan Nizin (COCI16_nizin) C++14
0 / 100
1000 ms 17676 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];
                ans++;
                n++;
                }

        }
    }
    cout<<ans;
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 0 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 0 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 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 103 ms 1808 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 469 ms 7500 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 1004 ms 16388 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 1076 ms 17676 KB Time limit exceeded
2 Halted 0 ms 0 KB -