# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
338923 |
2020-12-24T09:48:39 Z |
kkk |
Money (IZhO17_money) |
C++14 |
|
1 ms |
364 KB |
#include<iostream>
#include<set>
using namespace std;
long long m[10000004];
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(i<n-1 && m[i]<m[i+1] && m[i+1]<pr)
{s.insert(m[i+1]);i++;}
br++;
}
cout<<br<<endl;
}
# |
Verdict |
Execution time |
Memory |
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 |
- |
# |
Verdict |
Execution time |
Memory |
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 |
- |
# |
Verdict |
Execution time |
Memory |
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 |
- |
# |
Verdict |
Execution time |
Memory |
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 |
- |