結果
| 問題 |
No.1703 Much Matching
|
| コンテスト | |
| ユーザー |
houren
|
| 提出日時 | 2021-10-09 13:25:51 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 580 bytes |
| コンパイル時間 | 1,690 ms |
| コンパイル使用メモリ | 169,464 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-07-26 20:16:23 |
| 合計ジャッジ時間 | 19,688 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 1 WA * 3 RE * 31 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll MOD = 1000000007;
using P = pair<int,int>;
#define rep(i, n) for(int i = 0; i < n; i++)
#define all(x) (x).begin(),(x).end()
int main(){
int n,m,q;
cin >> n >> m >> q;
int ans = 0;
vector<int> a(n), b(n), lis(n);
rep(i,q){
cin >> a[i] >> b[i];
int length = 0;
rep(j,i){
if(a[j] < a[i] && b[j] < b[i]) length = max(lis[j],length);
}
lis[i] = length + 1;
ans = max(lis[i],ans);
}
cout << ans << endl;
return 0;
}
houren