Submission #6459937


Source Code Expand

Copy
#include <bits/stdc++.h>
using namespace std;


int main() {
	int n; cin >> n;
	multiset<int> s;

	for (int i = 0; i < n; i++) {
		int a; cin >> a;
		auto it = s.upper_bound(-a);
		if (it == s.end()) s.insert(-a);
		else {
			s.erase(it);
			s.insert(-a);
		}
	}
	
	cout << s.size() << endl;

	return 0;
}

Submission Info

Submission Time
Task E - Sequence Decomposing
User Nachia
Language C# (Mono 4.6.2.0)
Score 0
Code Size 330 Byte
Status CE

Compile Error

./Main.cs(3,0): error CS1024: Wrong preprocessor directive
./Main.cs(3,6): error CS1525: Unexpected symbol `namespace', expecting `identifier' or `static'
./Main.cs(3,19): error CS1525: Unexpected symbol `;', expecting `identifier' or `static'
./Main.cs(7,1): error CS1525: Unexpected symbol `int', expecting `identifier' or `static'
./Main.cs(11,2): error CS1525: Unexpected symbol `int', expecting `identifier' or `static'
./Main.cs(12,25): error CS1525: Unexpected symbol `(', expecting `identifier' or `static'
./Main.cs(13,17): error CS1525: Unexpected symbol `(', expecting `identifier' or `static'
./Main.cs(13,29): error CS1525: Unexpected symbol `(', expecting `identifier' or `static'
./Main.cs(15,3): error CS1525: Unexpected symbol `s', expecting `identifier' or `static'
./Main.cs(15,10): error CS1525: Unexpected symbol `(', expecting `identifier' or `static'
./Main.cs(16,11): error CS1525: Unexpected symbol `(', expecting `identifier' or `static'
./Main.cs(17,3): error CS1514: Unexpected symbol `}', expect...