結果
問題 | No.2590 100000 Days of Christmas |
ユーザー |
|
提出日時 | 2024-03-14 09:19:58 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 226 ms / 2,000 ms |
コード長 | 346 bytes |
コンパイル時間 | 1,841 ms |
コンパイル使用メモリ | 201,064 KB |
最終ジャッジ日時 | 2025-02-20 04:18:54 |
ジャッジサーバーID (参考情報) |
judge3 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 22 |
ソースコード
#include <bits/stdc++.h> using namespace std; using ll = long long; int N; map<string, ll> mp; int main(void){ cin >> N; string tmp; getline(cin, tmp); for (int i = 1; i <= N; i++) { string S; getline(cin, S); mp[S] += (ll)i * (N - i + 1); } for (auto p: mp) { cout << p.second << ' ' << p.first << endl; } return 0; }