답안 #338919

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
338919 2020-12-24T09:44:48 Z kkk Money (IZhO17_money) C++14
0 / 100
1 ms 364 KB
#include<iostream>
#include<set>
using namespace std;
long long m[1000004];
set <long long> s;
int main()
{
    long long n,i,pr=1e10,br=0;
    cin>>n;
    for(i=0;i<n;i++)cin>>m[i];
    s.insert(pr);
    for(i=0;i<n;i++)
    {
        pr=*s.upper_bound(m[i]);
        s.insert(m[i]);
        while(m[i]<m[i+1] && m[i+1]<pr)
        {s.insert(m[i+1]);i++;}

        br++;
    }
    cout<<br<<endl;

}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Correct 1 ms 364 KB Output is correct
4 Incorrect 1 ms 364 KB Output isn't correct
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Correct 1 ms 364 KB Output is correct
4 Incorrect 1 ms 364 KB Output isn't correct
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Correct 1 ms 364 KB Output is correct
4 Incorrect 1 ms 364 KB Output isn't correct
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Correct 1 ms 364 KB Output is correct
4 Incorrect 1 ms 364 KB Output isn't correct
5 Halted 0 ms 0 KB -