結果

問題 No.2740 Old Maid
ユーザー 👑 p-adicp-adic
提出日時 2024-04-21 19:56:53
言語 cLay
(20240104-1)
結果
AC  
実行時間 437 ms / 2,000 ms
コード長 250 bytes
コンパイル時間 2,373 ms
コンパイル使用メモリ 187,024 KB
実行使用メモリ 30,464 KB
最終ジャッジ日時 2024-04-21 19:57:09
合計ジャッジ時間 15,940 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 169 ms
30,336 KB
testcase_01 AC 170 ms
30,336 KB
testcase_02 AC 167 ms
30,336 KB
testcase_03 AC 166 ms
30,464 KB
testcase_04 AC 170 ms
30,464 KB
testcase_05 AC 170 ms
30,336 KB
testcase_06 AC 171 ms
30,336 KB
testcase_07 AC 171 ms
30,336 KB
testcase_08 AC 167 ms
30,464 KB
testcase_09 AC 170 ms
30,336 KB
testcase_10 AC 159 ms
30,464 KB
testcase_11 AC 155 ms
30,336 KB
testcase_12 AC 286 ms
22,400 KB
testcase_13 AC 319 ms
23,936 KB
testcase_14 AC 38 ms
7,680 KB
testcase_15 AC 54 ms
9,216 KB
testcase_16 AC 199 ms
18,176 KB
testcase_17 AC 35 ms
7,552 KB
testcase_18 AC 296 ms
23,168 KB
testcase_19 AC 92 ms
11,776 KB
testcase_20 AC 364 ms
26,368 KB
testcase_21 AC 45 ms
8,320 KB
testcase_22 AC 203 ms
17,536 KB
testcase_23 AC 25 ms
6,944 KB
testcase_24 AC 84 ms
11,392 KB
testcase_25 AC 385 ms
27,392 KB
testcase_26 AC 3 ms
6,944 KB
testcase_27 AC 17 ms
6,944 KB
testcase_28 AC 200 ms
18,048 KB
testcase_29 AC 183 ms
17,152 KB
testcase_30 AC 6 ms
6,944 KB
testcase_31 AC 437 ms
29,952 KB
testcase_32 AC 104 ms
12,800 KB
testcase_33 AC 411 ms
28,416 KB
testcase_34 AC 185 ms
17,024 KB
testcase_35 AC 81 ms
11,136 KB
testcase_36 AC 87 ms
11,648 KB
testcase_37 AC 140 ms
14,720 KB
testcase_38 AC 69 ms
10,240 KB
testcase_39 AC 32 ms
7,296 KB
testcase_40 AC 248 ms
20,608 KB
testcase_41 AC 373 ms
26,112 KB
testcase_42 AC 2 ms
6,940 KB
testcase_43 AC 1 ms
6,944 KB
testcase_44 AC 2 ms
6,944 KB
testcase_45 AC 2 ms
6,940 KB
testcase_46 AC 1 ms
6,940 KB
testcase_47 AC 2 ms
6,940 KB
testcase_48 AC 2 ms
6,944 KB
testcase_49 AC 2 ms
6,940 KB
testcase_50 AC 1 ms
6,944 KB
testcase_51 AC 1 ms
6,940 KB
testcase_52 AC 2 ms
6,944 KB
testcase_53 AC 1 ms
6,940 KB
testcase_54 AC 2 ms
6,940 KB
testcase_55 AC 1 ms
6,944 KB
testcase_56 AC 2 ms
6,940 KB
testcase_57 AC 1 ms
6,940 KB
testcase_58 AC 2 ms
6,944 KB
testcase_59 AC 1 ms
6,944 KB
testcase_60 AC 2 ms
6,944 KB
testcase_61 AC 2 ms
6,940 KB
testcase_62 AC 1 ms
6,940 KB
testcase_63 AC 2 ms
6,940 KB
testcase_64 AC 2 ms
6,944 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

ll@N,@p[N],q[N],s,t;set<ll>I;set<pair<ll,ll>>S;rep(i,N)I.insert(i),S.insert({p[i],i});rep(n,N/2){auto j=S.begin();j->second<*I.rbegin()?j:++j;I.erase(s=j->second);I.erase(t=*I.upper_bound(s));S.erase(j);S.erase({q[2n+1]=p[t],t});q[2n]=p[s];}wt(q(N));
0