結果

問題 No.628 Tagの勢い
ユーザー chacoder1chacoder1
提出日時 2021-05-10 12:48:12
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 566 bytes
コンパイル時間 2,443 ms
コンパイル使用メモリ 210,240 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-19 21:19:33
合計ジャッジ時間 3,897 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 2 ms
4,348 KB
testcase_02 WA -
testcase_03 AC 2 ms
4,348 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 2 ms
4,348 KB
testcase_07 AC 2 ms
4,348 KB
testcase_08 AC 3 ms
4,348 KB
testcase_09 AC 3 ms
4,348 KB
testcase_10 AC 2 ms
4,348 KB
testcase_11 AC 3 ms
4,348 KB
testcase_12 AC 5 ms
4,348 KB
testcase_13 AC 5 ms
4,348 KB
testcase_14 AC 5 ms
4,348 KB
testcase_15 WA -
testcase_16 AC 4 ms
4,348 KB
testcase_17 WA -
testcase_18 AC 2 ms
4,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#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;
}
0