結果
問題 |
No.628 Tagの勢い
|
ユーザー |
![]() |
提出日時 | 2021-05-10 12:48:12 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 566 bytes |
コンパイル時間 | 5,197 ms |
コンパイル使用メモリ | 201,932 KB |
最終ジャッジ日時 | 2025-01-21 09:49:08 |
ジャッジサーバーID (参考情報) |
judge5 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 13 WA * 6 |
ソースコード
#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=1000;i>=0;i--){ for(auto e:mp){ if(e.second==i){ cout<<e.first<<" "<<i<<endl; cnt++; if(cnt==10){ return 0; } } } } cout<<endl; return 0; }