結果
問題 | No.2590 100000 Days of Christmas |
ユーザー |
|
提出日時 | 2023-12-18 02:48:07 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 369 bytes |
コンパイル時間 | 2,174 ms |
コンパイル使用メモリ | 201,752 KB |
最終ジャッジ日時 | 2025-02-18 12:02:18 |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 4 TLE * 1 -- * 17 |
ソースコード
#include <bits/stdc++.h>using namespace std;int main() {int N;cin >> N;cin.ignore();map<string, int> mp, sum;for(int i = 0; i < N; i++) {string s;getline(cin, s);mp[s] += i+1;for(const auto& [k, v] : mp) sum[k] += v;}for(const auto& [k, v] : sum) {cout << v << ' ' << k << endl;}}