hiho week 143 register

Ended

Participants:1650

Verdict:Accepted
Score:100 / 100
Submitted:2017-03-27 10:15:02

Lang:G++

Edit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include <iostream>
#include <vector>
using namespace std;
class in{
public:
    int N;
    vector<int> key;
    in(){
        cin>>N;
        for(int i=0; i<N; i++){
            int tmp;
            cin>>tmp;
            key.push_back(tmp);
        }
    }
};
int main(int argc, const char* argv[]){
    in p;
    if(p.N==0)
        return 0;
    else if(p.N==1){
        cout<<1;
        return 0;
    }
    int i=p.N-1;
    while(i>0){
        if(p.key[i]<p.key[i-1])
            break;
        i--;
    }
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX