結果

問題 No.2453 Seat Allocation
ユーザー 👑 p-adicp-adic
提出日時 2023-08-19 21:38:18
言語 cLay
(20240104-1)
結果
AC  
実行時間 98 ms / 2,000 ms
コード長 278 bytes
コンパイル時間 3,206 ms
コンパイル使用メモリ 171,404 KB
実行使用メモリ 14,472 KB
最終ジャッジ日時 2023-09-07 15:34:14
合計ジャッジ時間 5,515 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 1 ms
4,380 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 1 ms
4,376 KB
testcase_05 AC 71 ms
14,388 KB
testcase_06 AC 11 ms
5,460 KB
testcase_07 AC 33 ms
12,524 KB
testcase_08 AC 6 ms
4,420 KB
testcase_09 AC 97 ms
14,332 KB
testcase_10 AC 98 ms
14,336 KB
testcase_11 AC 94 ms
14,472 KB
testcase_12 AC 12 ms
5,364 KB
testcase_13 AC 18 ms
5,464 KB
testcase_14 AC 10 ms
5,416 KB
testcase_15 AC 28 ms
5,632 KB
testcase_16 AC 22 ms
5,184 KB
testcase_17 AC 2 ms
4,380 KB
testcase_18 AC 49 ms
9,184 KB
testcase_19 AC 72 ms
11,988 KB
testcase_20 AC 27 ms
7,480 KB
testcase_21 AC 26 ms
6,164 KB
testcase_22 AC 39 ms
7,260 KB
testcase_23 AC 2 ms
4,380 KB
testcase_24 AC 1 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

struct T{ll a,b;T(ll p,ll q):a(p),b(q){}};bool operator<(T s,T t){return s.a*t.b>t.a*s.b;}{ll@N,@M,@A[N],@B[M],t,j;set<tuple<T,ll,ll>>C;rep(i,N)C.insert({{A[i],B[0]},i,0});rep(M){const auto&c=*C.begin();wt(1+(t=get<1>(c)));j=get<2>(c)+1;C.erase(c);C.insert({{A[t],B[j]},t,j});}}
0