結果
問題 | No.8042 本棚 |
ユーザー | a |
提出日時 | 2019-04-01 21:58:54 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 493 bytes |
コンパイル時間 | 1,943 ms |
コンパイル使用メモリ | 184,084 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-28 01:49:44 |
合計ジャッジ時間 | 2,786 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 24 |
ソースコード
#include "bits/stdc++.h" using namespace std; const string mp[] = {"iti", "ni", "san", "yon"}; void solve(void) { int n; cin >> n; set<pair<string, int>> dic; map<string, int> rmp; rmp["iti"] = 0; rmp["ni"] = 1; rmp["san"] = 2; rmp["yon"] = 3; while (n--) { string k, id; cin >> k >> id; dic.insert(make_pair(k, rmp[id])); } for (auto p : dic) cout << p.first << ' ' << mp[p.second] << endl; } int main(void) { solve(); //cout << "yui(*-v・)yui" << endl; return 0; }