#include <bits/stdc++.h>
using namespace std;
int main(){
multiset <int> mulse;
int n, a, m;
cin>>n;
for(int i = 1; i <= n; i++) {
cin>>a;
mulse.insert(a);
auto m=mulse.lower_bound(a);
m++;
if (m!=mulse.end())
mulse.erase(m);
}
cout<<mulse.size();
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CmludCBtYWluKCl7Cm11bHRpc2V0IDxpbnQ+IG11bHNlOwppbnQgbiwgYSwgbTsKY2luPj5uOwpmb3IoaW50IGkgPSAxOyBpIDw9IG47IGkrKykgewogICAgY2luPj5hOwogICAgbXVsc2UuaW5zZXJ0KGEpOwogICAgYXV0byBtPW11bHNlLmxvd2VyX2JvdW5kKGEpOwogICAgbSsrOwogICAgaWYgKG0hPW11bHNlLmVuZCgpKSAKICAgICAgICBtdWxzZS5lcmFzZShtKTsKfQpjb3V0PDxtdWxzZS5zaXplKCk7CiAgICByZXR1cm4gMDsKfQo=
Main.java:1: error: illegal character: '#'
#include <bits/stdc++.h>
^
Main.java:1: error: class, interface, or enum expected
#include <bits/stdc++.h>
^
Main.java:3: error: class, interface, or enum expected
int main(){
^
Main.java:5: error: class, interface, or enum expected
int n, a, m;
^
Main.java:6: error: class, interface, or enum expected
cin>>n;
^
Main.java:7: error: class, interface, or enum expected
for(int i = 1; i <= n; i++) {
^
Main.java:7: error: class, interface, or enum expected
for(int i = 1; i <= n; i++) {
^
Main.java:7: error: class, interface, or enum expected
for(int i = 1; i <= n; i++) {
^
Main.java:9: error: class, interface, or enum expected
mulse.insert(a);
^
Main.java:10: error: class, interface, or enum expected
auto m=mulse.lower_bound(a);
^
Main.java:11: error: class, interface, or enum expected
m++;
^
Main.java:12: error: class, interface, or enum expected
if (m!=mulse.end())
^
Main.java:14: error: class, interface, or enum expected
}
^
Main.java:16: error: class, interface, or enum expected
return 0;
^
Main.java:17: error: class, interface, or enum expected
}
^
15 errors