fork(3) download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. int main(){
  4. multiset <int> mulse;
  5. int n, a, m;
  6. cin>>n;
  7. for(int i = 1; i <= n; i++) {
  8. cin>>a;
  9. mulse.insert(a);
  10. auto m=mulse.lower_bound(a);
  11. m++;
  12. if (m!=mulse.end())
  13. mulse.erase(m);
  14. }
  15. cout<<mulse.size();
  16. return 0;
  17. }
  18.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
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
stdout
Standard output is empty