結果

問題 No.2453 Seat Allocation
ユーザー tailstails
提出日時 2023-09-01 22:16:59
言語 cLay
(20240104-1)
結果
AC  
実行時間 41 ms / 2,000 ms
コード長 276 bytes
コンパイル時間 1,804 ms
コンパイル使用メモリ 166,816 KB
実行使用メモリ 8,040 KB
最終ジャッジ日時 2023-09-07 15:35:39
合計ジャッジ時間 3,541 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 2 ms
4,376 KB
testcase_05 AC 23 ms
7,840 KB
testcase_06 AC 7 ms
5,336 KB
testcase_07 AC 7 ms
6,176 KB
testcase_08 AC 4 ms
4,380 KB
testcase_09 AC 41 ms
8,040 KB
testcase_10 AC 39 ms
8,032 KB
testcase_11 AC 40 ms
7,960 KB
testcase_12 AC 7 ms
5,308 KB
testcase_13 AC 13 ms
5,464 KB
testcase_14 AC 7 ms
5,372 KB
testcase_15 AC 19 ms
5,584 KB
testcase_16 AC 13 ms
5,112 KB
testcase_17 AC 2 ms
4,376 KB
testcase_18 AC 27 ms
6,420 KB
testcase_19 AC 34 ms
7,280 KB
testcase_20 AC 13 ms
5,200 KB
testcase_21 AC 18 ms
5,248 KB
testcase_22 AC 25 ms
5,912 KB
testcase_23 AC 1 ms
4,376 KB
testcase_24 AC 2 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

struct C{ll i,j;};
ll a[1d5],b[1d5];
bool operator<(C x,C y){
	ll d=a[x.i]*b[y.j]-a[y.i]*b[x.j];
	return d<0?1:d>0?0:x.i>y.i;
}
{
	ll@n,@m;
	rd(a(n),b(m));
	priority_queue<C>q;
	rep(i,n)q.push({i,0});
	rep(m){
		C c=q.top();
		q.pop();
		wt(c.i+1);
		c.j++;
		q.push(c);
	}
}
0