結果
| 問題 |
No.8042 本棚
|
| コンテスト | |
| ユーザー |
sykwer
|
| 提出日時 | 2019-04-01 21:25:54 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 445 bytes |
| コンパイル時間 | 1,208 ms |
| コンパイル使用メモリ | 87,352 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-28 01:42:11 |
| 合計ジャッジ時間 | 2,059 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 24 |
ソースコード
#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <utility>
using namespace std;
using P = pair<string, string>;
int main() {
int N;
cin >> N;
vector<P> strs(N);
for (int i = 0; i < N; i++) {
string str1, str2;
cin >> str1 >> str2;
strs[i] = P(str1, str2);
}
sort(strs.begin(), strs.end());
for (P str : strs) cout << str.first + " " + str.second << endl;
}
sykwer