結果
| 問題 |
No.8042 本棚
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-03-07 12:53:31 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 42 ms / 2,000 ms |
| コード長 | 630 bytes |
| コンパイル時間 | 968 ms |
| コンパイル使用メモリ | 111,600 KB |
| 実行使用メモリ | 20,096 KB |
| 最終ジャッジ日時 | 2024-10-08 23:12:44 |
| 合計ジャッジ時間 | 3,094 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 24 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
using System.Collections.Generic;
using System.Linq;
namespace _3042
{
class Program
{
static void Main(string[] args)
{
var l = new List<(string, string)>();
var n = int.Parse(Console.ReadLine());
foreach(var i in Enumerable.Range(0,n)){
var s = Console.ReadLine().Split();
l.Add((s[0], s[1]));
}
var ls = l.OrderBy(x => x.Item1).ThenBy(x => x.Item2);
foreach(var t in ls){
Console.WriteLine(string.Format("{0} {1}",t.Item1, t.Item2));
}
}
}
}