結果
| 問題 | No.8042 本棚 |
| コンテスト | |
| ユーザー |
leaf_1415
|
| 提出日時 | 2019-04-01 21:11:09 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| + 241µs | |
| コード長 | 374 bytes |
| 記録 | |
| コンパイル時間 | 784 ms |
| コンパイル使用メモリ | 92,536 KB |
| 実行使用メモリ | 5,888 KB |
| 最終ジャッジ日時 | 2026-07-31 13:49:17 |
| 合計ジャッジ時間 | 2,074 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 24 |
ソースコード
#include <iostream>
#include <string>
#include <algorithm>
#include <utility>
using namespace std;
int n;
pair<string, string> p[55];
int main(void)
{
cin >> n;
string s, t;
for(int i = 1; i <= n; i++){
cin >> s >> t;
p[i] = make_pair(s, t);
}
sort(p+1, p+n+1);
for(int i = 1 ; i <= n; i++){
cout << p[i].first << " " << p[i].second << endl;
}
return 0;
}
leaf_1415