結果
問題 |
No.8042 本棚
|
ユーザー |
![]() |
提出日時 | 2020-03-30 14:02:55 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 301 bytes |
コンパイル時間 | 2,299 ms |
コンパイル使用メモリ | 180,804 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-12 00:53:42 |
合計ジャッジ時間 | 3,441 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 24 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(){string s[5]={"","iti","ni","san","yon"};int n;string t;cin>>n;vector<pair<string,int>>a(n);for(auto&e:a){cin >> e.first >> t;for(int i=1;i<5;i++)if(s[i]==t)e.second=i;}sort(begin(a),end(a));for(auto e:a){cout<<e.first<<" "<<s[e.second]<<'\n';}}