結果
問題 | No.1703 Much Matching |
ユーザー | yakki |
提出日時 | 2021-10-08 22:50:28 |
言語 | C++17 (gcc 12.3.0 + boost 1.83.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 902 bytes |
コンパイル時間 | 2,210 ms |
コンパイル使用メモリ | 205,856 KB |
実行使用メモリ | 18,600 KB |
最終ジャッジ日時 | 2023-09-30 11:58:32 |
合計ジャッジ時間 | 6,903 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 2 ms
4,380 KB |
testcase_01 | AC | 2 ms
4,380 KB |
testcase_02 | AC | 1 ms
4,376 KB |
testcase_03 | AC | 2 ms
4,376 KB |
testcase_04 | WA | - |
testcase_05 | AC | 2 ms
4,380 KB |
testcase_06 | WA | - |
testcase_07 | AC | 9 ms
4,376 KB |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | WA | - |
testcase_17 | AC | 111 ms
6,196 KB |
testcase_18 | WA | - |
testcase_19 | AC | 244 ms
9,788 KB |
testcase_20 | WA | - |
testcase_21 | AC | 293 ms
11,168 KB |
testcase_22 | WA | - |
testcase_23 | AC | 82 ms
5,424 KB |
testcase_24 | WA | - |
testcase_25 | WA | - |
testcase_26 | WA | - |
testcase_27 | AC | 121 ms
6,472 KB |
testcase_28 | WA | - |
testcase_29 | WA | - |
testcase_30 | WA | - |
testcase_31 | WA | - |
testcase_32 | WA | - |
testcase_33 | WA | - |
testcase_34 | WA | - |
testcase_35 | WA | - |
testcase_36 | AC | 560 ms
18,600 KB |
testcase_37 | AC | 2 ms
4,376 KB |
ソースコード
#include<bits/stdc++.h> //#include<atcoder/all> using namespace std; //using namespace atcoder; #define repr(i, a, b) for (int i = (int)(a); i < (int)(b); i++) #define rep(i, n) repr(i, 0, n) #define INF 2e9 //#define MOD 1000000007 #define MOD 998244353 #define LINF (long long)4e18 #define jck 3.141592 #define PI acos(-1.0) const double EPS = 1e-15; using ll = long long; using Pi = pair<int,int>; using Pl = pair<ll,ll>; //using mint = modint998244353; int dh[] = {-1,0,1,0}; int dw[] = {0,1,0,-1}; int main(){ int n,m,q; cin >> n >> m >> q; vector<Pi> ab(q); rep(i,q){ cin >> ab[i].first >> ab[i].second; } sort(ab.begin(),ab.end()); vector<int> c(q); rep(i,q) c[i] = ab[i].second; vector<int> dp(q,INF); rep(i,q){ *lower_bound(dp.begin(),dp.end(),c[i]) = c[i]; } cout << lower_bound(dp.begin(),dp.end(),INF)-dp.begin() <<endl; }