結果

問題 No.2804 Fixer And Ratism
ユーザー tailstails
提出日時 2024-07-12 21:33:17
言語 cLay
(20241019-1)
結果
WA  
実行時間 -
コード長 366 bytes
コンパイル時間 4,075 ms
コンパイル使用メモリ 184,172 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-12 21:33:24
合計ジャッジ時間 5,088 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 11 WA * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

LHeap<ll>h;
h.malloc(100,1);
map<string,ll>m;
string a[100];
ll@n,@q,b=0;
rep(q){
	ll@t;
	if(t==1){
		string@s;
		ll@r;
		ll d=b++;
		h.change(d,r);
		m[s]=d;
		a[d]=s;
	}
	if(t==2){
		ll@x;
		n-=x;
	}
	if(t==3){
		string@s;
		ll@x;
		ll d=m[s];
		ll r=h.val[d];
		if(r<4001){
			h.change(d,r+4001);
		}
		n+=x;
	}
	while(h.size>n){
		ll d=h.pop();
		wt(a[d]);
	}
}
0