#include <bits/stdc++.h>
using namespace std;
#define int long long
signed main()
{
ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
int n, x; cin >> n >> x;
multiset <int> s;
for (int i = 1, ai; i <= n; i++)
{
cin >> ai;
s.insert(ai);
auto it = s.lower_bound(ai);
it++;
if (it != s.end()) s.erase(it);
}
cout << s.size();
}
# |
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 |
1 ms |
348 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 |
Correct |
36 ms |
2416 KB |
Output is correct |
2 |
Correct |
34 ms |
2392 KB |
Output is correct |
3 |
Correct |
34 ms |
2388 KB |
Output is correct |
4 |
Correct |
36 ms |
2252 KB |
Output is correct |
5 |
Correct |
49 ms |
6224 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
8 ms |
856 KB |
Output is correct |
2 |
Correct |
8 ms |
836 KB |
Output is correct |
3 |
Correct |
8 ms |
952 KB |
Output is correct |
4 |
Incorrect |
10 ms |
1884 KB |
Output isn't correct |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
18 ms |
1624 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 |
- |