結果
| 問題 |
No.628 Tagの勢い
|
| コンテスト | |
| ユーザー |
chacoder1
|
| 提出日時 | 2021-05-10 12:51:41 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 91 ms / 2,000 ms |
| コード長 | 553 bytes |
| コンパイル時間 | 2,481 ms |
| コンパイル使用メモリ | 200,232 KB |
| 最終ジャッジ日時 | 2025-01-21 09:49:48 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 19 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
typedef long long ll;
#define int long long
signed main(){
int n;
cin>>n;
map<string,int>mp;
rep(i,n){
int gazo;
cin>>gazo;
int m,pnt;
cin>>m>>pnt;
string tag;
rep(i,m){
cin>>tag;
mp[tag]+=pnt;
}
}
int cnt=0;
for(int i=10000;i>=0;i--){
for(auto e:mp){
if(e.second==i){
cout<<e.first<<" "<<i<<endl;
cnt++;
if(cnt==10){
return 0;
}
}
}
}
return 0;
}
chacoder1