結果
| 問題 | No.2590 100000 Days of Christmas |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-11-23 15:23:55 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 108 ms / 2,000 ms |
| コード長 | 434 bytes |
| 記録 | |
| コンパイル時間 | 1,183 ms |
| コンパイル使用メモリ | 190,032 KB |
| 実行使用メモリ | 11,392 KB |
| 最終ジャッジ日時 | 2026-04-14 04:33:17 |
| 合計ジャッジ時間 | 3,163 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 22 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main(void) {
ll N;
cin >> N;
string S; getline(cin, S); // 最初の改行を取り除く
map<string, ll> presents;
for (ll i = 0; i < N; i++) {
string S;
getline(cin, S);
presents[S] += (i + 1) * (N - i);
}
for (auto &item : presents) {
cout << item.second << " " << item.first << "\n";
}
}