#include <bits/stdc++.h>
using namespace std; using ii = pair<int,int>; using ll = long long;
void o_o(){ cerr << endl; }
template <class H, class...T> void o_o(H h,T...t) { cerr << ' ' << h; o_o(t...); }
#define debug(...) cerr<<'['<<#__VA_ARGS__<<"]:",o_o(__VA_ARGS__)
#define rep(i,a,b) for (auto i = (a); i <= (b); ++i)
#define all(x) (x).begin(), (x).end()
#define size(x) int((x).size())
#define fi first
#define se second
#define Mup(x,y) x = max(x,y)
const int N = 1e5+3;
int n;
int lis[N], answer;
struct X { int a, b, c, d; } t[N];
int main() {
cin.tie(0)->sync_with_stdio(0);
cin >> n;
rep(i,1,n) {
cin >> t[i].a >> t[i].b >> t[i].c >> t[i].d;
}
rep(i,1,n) rep(j,1,i-1) {
if (t[j].a < t[i].a and t[j].b < t[i].b and t[j].c < t[i].c and t[j].d < t[i].d) {
Mup(answer, Mup(lis[i], lis[j]+1));
}
}
cout << answer;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
340 KB |
Unexpected end of file - int32 expected |
2 |
Incorrect |
0 ms |
212 KB |
Unexpected end of file - int32 expected |
3 |
Incorrect |
1 ms |
340 KB |
Unexpected end of file - int32 expected |
4 |
Incorrect |
2 ms |
340 KB |
Unexpected end of file - int32 expected |
5 |
Incorrect |
8 ms |
340 KB |
Unexpected end of file - int32 expected |
6 |
Incorrect |
14 ms |
340 KB |
Unexpected end of file - int32 expected |
7 |
Incorrect |
25 ms |
468 KB |
Unexpected end of file - int32 expected |
8 |
Incorrect |
44 ms |
468 KB |
Unexpected end of file - int32 expected |
9 |
Incorrect |
157 ms |
724 KB |
Unexpected end of file - int32 expected |
10 |
Execution timed out |
649 ms |
1348 KB |
Time limit exceeded |
11 |
Execution timed out |
873 ms |
1508 KB |
Time limit exceeded |
12 |
Execution timed out |
1083 ms |
2600 KB |
Time limit exceeded |
13 |
Execution timed out |
1073 ms |
2868 KB |
Time limit exceeded |
14 |
Execution timed out |
1069 ms |
3584 KB |
Time limit exceeded |
15 |
Execution timed out |
1087 ms |
3636 KB |
Time limit exceeded |
16 |
Execution timed out |
1076 ms |
3904 KB |
Time limit exceeded |
17 |
Execution timed out |
1079 ms |
4220 KB |
Time limit exceeded |
18 |
Execution timed out |
1067 ms |
4316 KB |
Time limit exceeded |
19 |
Execution timed out |
1078 ms |
4560 KB |
Time limit exceeded |
20 |
Execution timed out |
1083 ms |
4720 KB |
Time limit exceeded |