結果

問題 No.433 ICPC国内予選の選抜ルールがこんな感じだったらうれしい
ユーザー IL_mstaIL_msta
提出日時 2017-03-12 14:14:43
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 55 ms / 4,000 ms
コード長 1,543 bytes
コンパイル時間 1,097 ms
コンパイル使用メモリ 114,024 KB
実行使用メモリ 6,760 KB
最終ジャッジ日時 2023-09-12 11:58:00
合計ジャッジ時間 5,279 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 53 ms
6,516 KB
testcase_01 AC 51 ms
6,720 KB
testcase_02 AC 51 ms
6,436 KB
testcase_03 AC 53 ms
6,580 KB
testcase_04 AC 53 ms
6,556 KB
testcase_05 AC 51 ms
6,540 KB
testcase_06 AC 55 ms
6,760 KB
testcase_07 AC 50 ms
6,488 KB
testcase_08 AC 51 ms
6,572 KB
testcase_09 AC 52 ms
6,480 KB
testcase_10 AC 50 ms
6,504 KB
testcase_11 AC 51 ms
6,604 KB
testcase_12 AC 52 ms
6,480 KB
testcase_13 AC 48 ms
6,520 KB
testcase_14 AC 50 ms
6,508 KB
testcase_15 AC 45 ms
6,484 KB
testcase_16 AC 52 ms
6,420 KB
testcase_17 AC 52 ms
6,480 KB
testcase_18 AC 52 ms
6,488 KB
testcase_19 AC 49 ms
6,580 KB
testcase_20 AC 49 ms
6,508 KB
testcase_21 AC 50 ms
6,504 KB
testcase_22 AC 52 ms
6,504 KB
testcase_23 AC 49 ms
6,520 KB
testcase_24 AC 49 ms
6,480 KB
testcase_25 AC 51 ms
6,484 KB
testcase_26 AC 48 ms
6,508 KB
testcase_27 AC 50 ms
6,480 KB
testcase_28 AC 49 ms
6,480 KB
testcase_29 AC 50 ms
6,484 KB
testcase_30 AC 1 ms
4,376 KB
testcase_31 AC 2 ms
4,376 KB
testcase_32 AC 53 ms
6,532 KB
testcase_33 AC 53 ms
6,492 KB
testcase_34 AC 52 ms
6,584 KB
testcase_35 AC 2 ms
4,376 KB
testcase_36 AC 2 ms
4,376 KB
testcase_37 AC 2 ms
4,376 KB
testcase_38 AC 2 ms
4,380 KB
testcase_39 AC 2 ms
4,376 KB
testcase_40 AC 2 ms
4,376 KB
testcase_41 AC 6 ms
4,376 KB
testcase_42 AC 6 ms
4,380 KB
testcase_43 AC 6 ms
4,376 KB
testcase_44 AC 6 ms
4,380 KB
testcase_45 AC 2 ms
4,376 KB
testcase_46 AC 7 ms
4,380 KB
testcase_47 AC 7 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#pragma region GNUC
//https://yukicoder.me/wiki/auto_vectorization
#ifdef __GNUC__
#pragma GCC optimize ("O3")
#pragma GCC target ("avx")
#endif
#pragma endregion
#define _USE_MATH_DEFINES
#pragma region
#include <iostream>
#include <iomanip>
#include <stdio.h>

#include <sstream>
#include <algorithm>
#include <cmath>

#include <string>
#include <cstring>
#include <vector>
#include <tuple>

#include <queue>
#include <complex>
#include <set>
#include <map>
#include <stack>
#include <list>

#include <fstream>
#include <random>
#pragma endregion //#include

using namespace::std;

/////////////////////
typedef tuple<int,int,int,int> DATA;
void solve(){
	int N,K;
	scanf("%d%d",&N,&K);
	
	vector< DATA > data0(N),data1(N);
	for(int i=0;i<N;++i){
		scanf("%d%d%d",&get<0>(data0[i]),&get<1>(data0[i]),&get<2>(data0[i]));
		//get<0>(data0[i]) *= -1;
		get<0>(data0[i]) = 10-get<0>(data0[i]);
		get<3>(data0[i]) = i;
	}
	sort(data0.begin(),data0.end());
	vector<int> univ(N,0);
	for(int i=0;i<N;++i){
		get<0>(data1[i]) = get<0>(data0[i]);
		get<1>(data1[i]) = univ[ get<2>(data0[i]) ];
		univ[ get<2>(data0[i]) ]++;
		get<2>(data1[i]) = get<1>(data0[i]);
		get<3>(data1[i]) = get<3>(data0[i]);
	}
	sort(data1.begin(), data1.end());

	for(int i=0;i<K;++i){
		printf("%d\n",get<3>(data1[i]) );
	}
}

#pragma region main
signed main(void){
	std::cin.tie(0);
	std::ios::sync_with_stdio(false);
	std::cout << std::fixed;//小数を10進数表示
	cout << setprecision(16);//小数点以下の桁数を指定
	
	solve();
}
#pragma endregion //main()
0