結果
問題 |
No.2590 100000 Days of Christmas
|
ユーザー |
![]() |
提出日時 | 2023-12-19 04:29:53 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 437 bytes |
コンパイル時間 | 2,010 ms |
コンパイル使用メモリ | 201,844 KB |
最終ジャッジ日時 | 2025-02-18 12:11:30 |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 14 WA * 8 |
ソースコード
#define rep(i,n) for(int i=0;i<(int)(n);i++) #define ALL(v) v.begin(),v.end() typedef long long ll; #include<bits/stdc++.h> using namespace std; int main(){ ios::sync_with_stdio(false); std::cin.tie(nullptr); int n; cin>>n; map<string,int> m; for(int i=0;i<=n;i++){ string s; getline(cin,s); if(i==0) continue; m[s]+=i*(n+1-i); } for(auto [a,b]:m){ cout<<b<<" "<<a<<endl; } return 0; }