結果

問題 No.3221 Count Turns
コンテスト
ユーザー vjudge1
提出日時 2025-10-26 17:01:51
言語 C++17(gcc12)
(gcc 12.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 542 bytes
コンパイル時間 4,098 ms
コンパイル使用メモリ 215,412 KB
実行使用メモリ 7,720 KB
最終ジャッジ日時 2025-10-26 17:02:00
合計ジャッジ時間 8,017 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 10 WA * 26
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
int n,h,t;
struct noob{
	int wz;
	double num;
	friend bool operator <(noob a,noob b){
		return a.num>b.num;
	}
}tmp;
priority_queue <noob> q;
int c[100010];
int main(){
	cin>>n>>h>>t;
	double a[100010];
	for(int i=1;i<=n;i++){
		int kkk;
		cin>>kkk;
		tmp.wz=i;
		tmp.num=a[i]=(double)h/(double)kkk;
		q.push(tmp);
	}
	for(int i=1;i<=t;i++){
		tmp=q.top();
		q.pop();
		c[tmp.wz]++;
		tmp.num+=a[tmp.wz];
		q.push(tmp);
	} 
	for(int i=1;i<=n;i++){
		cout<<c[i]<<" ";
	}
	cout<<"\n";
	return 0;
}
 
0