結果
問題 | No.8042 本棚 |
ユーザー | SHRIMP_ENG |
提出日時 | 2019-04-01 22:00:54 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 428 bytes |
コンパイル時間 | 562 ms |
コンパイル使用メモリ | 61,660 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-28 01:49:46 |
合計ジャッジ時間 | 1,399 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 24 |
ソースコード
#include <iostream> #include <string> #include <list> using namespace std; int main() { int N; cin >> N; string S, id; list<string> allBook; for (int i = 1; i < N+1; i++) { cin >> S; cin >> id; string name = S + " " + id; allBook.push_back(name); } allBook.sort(); std::list<std::string>::iterator itr; for (itr = allBook.begin(); itr != allBook.end(); itr++) { std::cout << *itr << std::endl; } }