結果
問題 | No.628 Tagの勢い |
ユーザー |
![]() |
提出日時 | 2025-02-18 11:06:31 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 4 ms / 2,000 ms |
コード長 | 9,762 bytes |
コンパイル時間 | 4,217 ms |
コンパイル使用メモリ | 295,464 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2025-02-18 11:06:42 |
合計ジャッジ時間 | 5,025 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 19 |
ソースコード
/* @author : LEOmnel_CHEEMSsi_420 AGUANTE CORAZON, AGUANTE SOMOS TODOS MONTIEL!!!! EL DIBU MARTINEZ !!!!! HABIA QUE CREER CARAJO NOMAS !!!!! La cumbia de los Cheems :v .... Viene el fin de semana, todo' a la cancha vamos a ir Est todo preparado, el bombo y el trapo para salir Al equipo que tiene ms aguante Lo llevo dentro del corazn Saltando, cantando, prendidos a los trapos Dejamos el almaaaaaaa.... en el score dale dale Cheems! dale Cheeeeeeeemmmsss !!!!! ---------------------------------------------------------------- Pal MbapCheems: Escuchen, corran la bola juegan en Francia pero son todos de Angola Que lindo eeees van a correeer son cometrabas como el puto de Mbappe Su vieja es nigeriana Su viejo camerunes Pero en el documento.... nacionalidad frances ---------------------------------------------------------------- EL MESSIas <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 ?????????????????????????????????????????????????????????????????????????? ?????????????????????????????????????????????????????????????????????????? ?????????????????????????????????????????????????????????????????????????? ?????????????????????????????????????????????????????????????????????????? ?????????????????????????????????????????????????????????????????????????? ?????????????????????????????????????????????????????????????????????????? ?????????????????????????????????????????????????????????????????????????? ?????????????????????????????????????????????????????????????????????????? ?????????????????????????????????????????????????????????????????????????? ?????????????????????????????????????????????????????????????????????????? ?????????????????????????????????????????????????????????????????????????? ?????????????????????????????????????????????????????????????????????????? ?????????????????????????????????????????????????????????????????????????? ?????????????????????????????????????????????????????????????????????????? ?????????????????????????????????????????????????????????????????????????? ?????????????????????????????????????????????????????????????????????????? ?????????????????????????????????????????????????????????????????????????? ?????????????????????????????????????????????????????????????????????????? ?????????????????????????????????????????????????????????????????????????? ?????????????????????????????????????????????????????????????????????????? ?????????????????????????????????????????????????????????????????????????? ?????????????????????????????????????????????????????????????????????????? ?????????????????????????????????????????????????????????????????????????? ?????????????????????????????????????????????????????????????????????????? ?????????????????????????????????????????????????????????????????????????? ?????????????????????????????????????????????????????????????????????????? ?????????????????????????????????????????????????????????????????????????? ?????????????????????????????????????????????????????????????????????????? ?????????????????????????????????????????????????????????????????????????? ?????????????????????????????????????????????????????????????????????????? ?????????????????????????????????????????????????????????????????????????? ?????????????????????????????????????????????????????????????????????????? ?????????????????????????????????????????????????????????????????????????? ?????????????????????????????????????????????????????????????????????????? ?????????????????????????????????????????????????????????????????????????? ?????????????????????????????????????????????????????????????????????????? ?????????????????????????????????????????????????????????????????????????? ?????????????????????????????????????????????????????????????????????????? ??????????????????????????????????????????????????????????????? ? Q.E.P.D Cheemsito :'v ?????????????????????????????????????????? ?????????????????????????????????????????? ?????????????????????????????????????????? ?????????????????????????????????????????? ?????????????????????????????????????????? ?????????????????????????????????????????? ?????????????????????????????????????????? ?????????????????????????????????????????? ?????????????????????????????????????????? ?????????????????????????????????????????? ?????????????????????????????????????????? ?????????????????????????????????????????? ?????????????????????????????????????????? ?????????????????????????????????????????? ?????????????????????????????????????????? ?????????????????????????????????????????? ?????????????????????????????????????????? ?????????????????????????????????????????? ?????????????????????????????????????????? ?????????????????????????????????????????? ?????????????????????????????????????????? ?????????????????????????????????????????? ?????????????????????????????????????????? ?????????????????????????????????????????? ?????????????????????????????????????????? ?????????????????????????????????????????? ?????????????????????????????????????????? ?????????????????????????????????????????? ?????????????????????????????????????????? ?????????????????????????????????????????? */ #include <iostream> #include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef unsigned long long int ull; #define pb push_back #define pf push_front #define lb lower_bound #define ub upper_bound #define all(v) v.begin(),v.end() #define rall(v) v.rbegin(),v.rend() #define ii pair<int,int> #define iii pair<int, ii> #define iiii pair<ii,ii> /* #define typeOfData ii #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define ordered_set tree<typeOfData, null_type,less<typeOfData>, rb_tree_tag,tree_order_statistics_node_update> using namespace __gnu_pbds; */ #define LINE if(debug) { cerr << " ------------------------------------------ " << endl; } #define debug1(A) if(debug) { cerr << "? " << #A << " : " << A << endl; } #define debug2(A, B) if(debug) { cerr << "? [ " << #A << " = " << A << " | " << #B << " = " << B << " ]" << endl; } #define debug3(A, B, C) if(debug) { cerr << "? [ " << #A << " = " << A << " | " << #B << " = " << B << " | " << #C << " = " << C << " ]" << endl; } #define debug4(A, B, C, D) if(debug) { cerr << "? [ " << #A << " = " << A << " | " << #B << " = " << B << " | " << #C << " = " << C << " | " << #D << " = " << D << " ]" << endl; } #define debugPair(a) if(debug) { cerr << "? " << #a << ": ( " << a.first << " , " << a.second << " )" << endl; } #define debugList(A) if(debug) { cerr << "? " << #A << ": "; if(debug) { bool leonelCheems = 0; cerr << "[ "; for(auto x : A) { if(!leonelCheems) cerr << x , leonelCheems = 1; else cerr << " , " << x ;} cerr << " ]" << endl; } } #define printList(A) { bool leonelCheems = 0; for(auto x : A) { if(!leonelCheems) {cout << x; leonelCheems = 1;}else {cout << " " << x;}} cout << endl; } #define debugIterablePairs(P) if(debug) { cerr << "? " << #P << " : "; cerr << "{ " << endl; for(auto it : P) { cerr << " " << it.first << " -> " << it.second << endl; } cerr << "} " << endl; } #define debugGraph(GP) if(debug) { cerr << "? " << #GP << " = "; cerr << "{ " << endl; int cntNodes = 0; for(vi adj : GP) { if(adj.size()) { cerr << " "; cerr << cntNodes << " => "; debugList(adj) } cntNodes ++;} cerr << "}" << endl;} #define debugGraphWeight(GP) if(debug) { cerr << "? " << #GP << " = {" << endl; int cntNodes = 0; for(auto it : GP ){ if( it.size() ){ cerr << cntNodes << " => [ "; for(auto iter : it){ cerr << iter.first << "-w{" << iter.second << "} "; } cerr << "]" << endl; } cntNodes++; } } #define debugMatrix(arr,F, C) if(debug) { cerr << "? " << #arr << endl; for(int i = 0 ; i < F ; i++){ cerr << "[ "; for(int j = 0 ; j < C ; j++){ cerr << arr[i][j] << " "; } cerr << "]" << endl;} } #define executeTime cerr << "Time elapsed: " << 1.0 * clock() / CLOCKS_PER_SEC << " s.\n"; #define FOR(i, l, r) for(int i = l; i < r ; i ++) #define endl '\n'; #define SZ(A) (int)A.size() typedef vector<int> vi; typedef vector<ii> vii; typedef vector<ll> vll; const int N = 1e5 + 9; const int mod = 1e9 + 7; const int inf = 2e9 + 9; const ll modL = 1e9 + 7; const ll infL = 2e18 + 9; const double pi = acos(-1); /* int Kx[8] = {1, 2, 2, 1, -1, -2, -2, -1}; int Ky[8] = {-2, -1, 1, 2, 2, 1, -1, -2}; int X[8] = {-1, 0, 1, 0, -1, 1, 1, -1}; int Y[8] = {0, 1, 0, -1, 1, 1, -1, -1}; */ // si no vas por todo, anda pa ash bobo // mirame a la cara, lo siento pero te como hermano * bailecito * void init(); bool debug = { 1 }; #define is pair<int, string> bool cmp(is a, is b) { if(a.first == b.first) { return a.second < b.second; } return a.first > b.first; } void cumbia420PaLosCheems(int testCase) { /* ESTA VA POR CHEEMSITO :'v */ int n; cin >> n; map<string, int> M; FOR(i, 1, n + 1) { int id, k, p; cin >> id >> k >> p; FOR(j, 0, k) { string s; cin >> s; M[s] += p; } } debugIterablePairs(M); vector<is> P; for(auto it : M) { P.pb(is(it.second, it.first)); } sort(all(P), cmp); FOR(i, 0, min(SZ(P), 10)) { cout << P[i].second << " " << P[i].first << endl; } } int main() { cin.tie(0); ios_base::sync_with_stdio(0); init(); int t = 1; //cin >> t; FOR(i, 1, t + 1) cumbia420PaLosCheems(i); return 0; } void init() { //freopen("ccski.in", "r", stdin); //freopen("ccski.out", "w", stdout); if(debug) cerr << "mira que te como hermanoo !!! " << endl; }