結果
問題 | No.8042 本棚 |
ユーザー | moririn2528_c |
提出日時 | 2019-04-01 21:17:32 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 1,094 bytes |
コンパイル時間 | 1,073 ms |
コンパイル使用メモリ | 88,216 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-28 01:41:22 |
合計ジャッジ時間 | 1,976 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 24 |
ソースコード
#include<iostream> #include<cstdio> #include<cstring> #include<string> #include<vector> #include<cmath> #include<algorithm> #include<map> #include<queue> #include<deque> using namespace std; typedef long long int LL; typedef pair<int,int> P; typedef pair<int,pair<int,int> > PP; typedef pair<LL,int> LP; const int INF=1<<30; const LL MAX=1e9+7; void array_show(int *array,int array_n,char middle=' '){ for(int i=0;i<array_n;i++)printf("%d%c",array[i],(i!=array_n-1?middle:'\n')); } void array_show(LL *array,int array_n,char middle=' '){ for(int i=0;i<array_n;i++)printf("%lld%c",array[i],(i!=array_n-1?middle:'\n')); } void print_YES_NO(bool answer){cout<<(answer?"YES":"NO")<<endl;} void print_Yes_No(bool answer){cout<<(answer?"Yes":"No")<<endl;} void print_POSSIBLE_IMPOSSIBLE(bool answer){cout<<(answer?"POSSIBLE":"IMPOSSIBLE")<<endl;} vector<pair<string,string> > v1; int main(){ int i,n; string sa,sb; cin>>n; for(i=0;i<n;i++){ cin>>sa>>sb; v1.push_back(make_pair(sa,sb)); } sort(v1.begin(),v1.end()); for(i=0;i<n;i++){ cout<<v1[i].first<<" "<<v1[i].second<<endl; } }