結果
問題 | No.2590 100000 Days of Christmas |
ユーザー |
![]() |
提出日時 | 2024-01-06 01:38:05 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 216 ms / 2,000 ms |
コード長 | 408 bytes |
コンパイル時間 | 1,743 ms |
コンパイル使用メモリ | 174,904 KB |
実行使用メモリ | 11,392 KB |
最終ジャッジ日時 | 2024-09-27 19:14:31 |
合計ジャッジ時間 | 5,084 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 22 |
ソースコード
#include <bits/stdc++.h>using namespace std;#define rep(i, n) for( ll i = 0; i < n; i++ )using ll = long long;int main() {int N;cin >> N;cin.ignore(numeric_limits<streamsize>::max(), '\n');map<string, ll> mp;string s;rep(i, N) {getline(cin, s);ll n = i + 1;mp[s] += n * (N - i);}for(auto it = mp.begin(); it != mp.end(); it++ ) cout << it->second << " " << it->first << endl;}