結果
| 問題 | 
                            No.8042 本棚
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2020-06-04 13:52:28 | 
| 言語 | C++17  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 412 bytes | 
| コンパイル時間 | 3,120 ms | 
| コンパイル使用メモリ | 97,332 KB | 
| 最終ジャッジ日時 | 2025-01-10 21:12:15 | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | WA * 3 | 
| other | WA * 24 | 
ソースコード
#include<iostream>
#include<vector>
#include<tuple>
#include<map>
#include<algorithm>
using namespace std;
int main(){
    int n;cin>>n;
    vector<pair<string,int>> a;
    a.reserve(n);
    map<string,int> m{{"iti",1},{"ni",2},{"san",3},{"yon",4}};
    for(int i=0;i<n;++i){
        string s,t;cin>>s>>t;
        a.emplace_back(s,m[t]);
    }
    sort(a.begin(),a.end());
    for(auto i:a)cout<<i.first<<"\n";
}