# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
102517 |
2019-03-25T15:00:40 Z |
jhnah917 |
None (KOI18_matrix) |
C++14 |
|
18 ms |
640 KB |
#include <bits/stdc++.h>
#define x first
#define y second
using namespace std;
typedef pair<int, int> p;
void f2(){
int n; cin >> n;
vector<p> v(n);
for(int i=0; i<n; i++) cin >> v[i].x >> v[i].y;
sort(v.begin(), v.end());
vector<int> lis;
for(auto &i : v){
int t = i.y;
auto it = lower_bound(lis.begin(), lis.end(), t);
if(it == lis.end()) lis.push_back(t);
else *it = t;
}
cout << lis.size();
}
int main(){
int n; cin >> n;
if(n == 2){
f2();
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
18 ms |
640 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
4 ms |
512 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
18 ms |
640 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
4 ms |
512 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |