Submission #896967

# Submission time Handle Problem Language Result Execution time Memory
896967 2024-01-02T11:37:51 Z AndrijaM Pancake (NOI12_pancake) C++14
4 / 25
14 ms 348 KB
#include <bits/stdc++.h>
using namespace std;

int main()
{
    int t;
    cin>>t;
    int n;
    while(t--)
    {
        cin>>n;
        vector<int>v;
        for(int i=0;i<n;i++)
        {
            int num;
            cin>>num;
            v.push_back(num);
        }
        reverse(v.begin(),v.end());
        vector<int>s;
        s=v;
        sort(s.begin(),s.end());
        if(v==s)
        {
            cout<<0<<endl;
        }
        else
        {
            
            cout<<1<<endl;
        }
    }
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 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 1 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 14 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -