結果
問題 |
No.2453 Seat Allocation
|
ユーザー |
👑 |
提出日時 | 2023-08-19 21:38:18 |
言語 | cLay (20241019-1) |
結果 |
AC
|
実行時間 | 126 ms / 2,000 ms |
コード長 | 278 bytes |
コンパイル時間 | 3,097 ms |
コンパイル使用メモリ | 191,688 KB |
実行使用メモリ | 14,464 KB |
最終ジャッジ日時 | 2025-06-20 01:43:02 |
合計ジャッジ時間 | 5,359 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 23 |
ソースコード
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});}}