結果

問題 No.433 ICPC国内予選の選抜ルールがこんな感じだったらうれしい
ユーザー dnishdnish
提出日時 2017-07-01 16:31:49
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 798 bytes
コンパイル時間 2,309 ms
コンパイル使用メモリ 171,536 KB
実行使用メモリ 6,540 KB
最終ジャッジ日時 2024-04-15 10:54:36
合計ジャッジ時間 8,597 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 AC 3 ms
5,376 KB
testcase_31 AC 3 ms
5,376 KB
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 AC 3 ms
5,376 KB
testcase_36 AC 3 ms
5,376 KB
testcase_37 AC 3 ms
5,376 KB
testcase_38 AC 3 ms
5,376 KB
testcase_39 AC 3 ms
5,376 KB
testcase_40 AC 4 ms
5,376 KB
testcase_41 AC 13 ms
5,376 KB
testcase_42 AC 12 ms
5,376 KB
testcase_43 AC 12 ms
5,376 KB
testcase_44 AC 13 ms
5,376 KB
testcase_45 AC 5 ms
5,376 KB
testcase_46 AC 25 ms
5,376 KB
testcase_47 AC 26 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define REP(i,n,N) for(int i=(n);i<(int) N;i++)
#define RREP(i,n,N) for(int i=N-1;i>=(int) n;i--)
#define p(s) cout<<(s)<<endl
#define DEBUG(x,y) cout<<#x<<": "<<x<<" , "<<#y<<": "<<y<<endl;
#define CK(n,a,b) ((a)<=(n)&&(n)<=(b))
#define F first
#define S second
typedef long long ll;
using namespace std;
const ll inf=1e9;

int N, K;
int S[100010], P[10010], U[100010];

int main(){
	cin>>N>>K;
	REP(i,0,N){
		cin>>S[i]>>P[i]>>U[i];
	}

	vector<pair< pair<int,int>, pair<int,int> > > v;
	REP(i,0,N){
		v.push_back({{-S[i],0},{P[i], i}});
	}
	sort(v.begin(), v.end());

	int univ[100010];
	REP(i,0,100010) univ[i] = 0;

	REP(i,0,N){
		univ[U[v[i].S.S]]++;
		v[i].F.S = univ[U[v[i].S.S]];
	}
	sort(v.begin(), v.end());

	REP(i,0,K){
		cout<<v[i].S.S<<endl;
	}

	return 0;
}
0