結果
| 問題 | No.2590 100000 Days of Christmas | 
| コンテスト | |
| ユーザー | 👑  potato167 | 
| 提出日時 | 2023-12-18 05:33:13 | 
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 133 ms / 2,000 ms | 
| コード長 | 364 bytes | 
| コンパイル時間 | 2,137 ms | 
| コンパイル使用メモリ | 199,788 KB | 
| 最終ジャッジ日時 | 2025-02-18 12:03:24 | 
| ジャッジサーバーID (参考情報) | judge5 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 22 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll=long long;
#define rep(i,a,b) for (int i=(int)(a);i<(int)(b);i++)
int main() {
    ll N;
    cin>>N;
    string S;
    getline(cin,S);
    map<string,ll> m;
    rep(i,0,N){
        getline(cin,S);
        m[S]+=(ll)(i+1)*(ll)(N-i);
    }
    for(auto x:m){
        cout<<x.second<<" "<<x.first<<"\n";
    }
}
            
            
            
        