# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
1106985 |
2024-10-31T10:54:30 Z |
dubabuba |
Money (IZhO17_money) |
C++14 |
|
1 ms |
504 KB |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
set<int> s;
for(int i = 0; i < n; i++) {
int a;
cin >> a;
auto it = s.lower_bound(-a);
if(it != s.end())
s.erase(it);
s.insert(-a);
}
cout << s.size() << endl;
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
504 KB |
Output is correct |
2 |
Incorrect |
1 ms |
336 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
504 KB |
Output is correct |
2 |
Incorrect |
1 ms |
336 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
504 KB |
Output is correct |
2 |
Incorrect |
1 ms |
336 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
504 KB |
Output is correct |
2 |
Incorrect |
1 ms |
336 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |