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