結果

問題 No.8042 本棚
ユーザー cureskol
提出日時 2020-03-30 10:54:31
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 266 bytes
コンパイル時間 2,254 ms
コンパイル使用メモリ 182,968 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-11 16:12:30
合計ジャッジ時間 2,880 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 24
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

typedef pair<string,string> P;

signed main(){
  int n;cin>>n;
  vector<P> v(n);
  while(n--){
    string s,t;cin>>s>>t;
    v[n]=P(s,t);
  }
  sort(v.begin(),v.end());
  for(P p:v)cout<<p.first<<" "<<p.second<<endl;
}
0