# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
566678 | hgmhc | trapezoid (balkan11_trapezoid) | C++17 | 1087 ms | 4720 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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 |
---|---|---|---|---|
Fetching results... |