結果

問題 No.267 トランプソート
ユーザー NoNo
提出日時 2015-11-04 17:11:03
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 82 ms / 1,000 ms
コード長 1,251 bytes
コンパイル時間 2,067 ms
コンパイル使用メモリ 100,612 KB
実行使用メモリ 23,760 KB
最終ジャッジ日時 2023-10-11 13:42:09
合計ジャッジ時間 5,089 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 82 ms
21,556 KB
testcase_01 AC 82 ms
23,576 KB
testcase_02 AC 80 ms
21,672 KB
testcase_03 AC 58 ms
20,828 KB
testcase_04 AC 80 ms
21,576 KB
testcase_05 AC 80 ms
21,668 KB
testcase_06 AC 81 ms
19,764 KB
testcase_07 AC 80 ms
19,668 KB
testcase_08 AC 80 ms
21,700 KB
testcase_09 AC 81 ms
21,676 KB
testcase_10 AC 81 ms
21,676 KB
testcase_11 AC 82 ms
21,616 KB
testcase_12 AC 81 ms
21,708 KB
testcase_13 AC 82 ms
21,700 KB
testcase_14 AC 82 ms
21,616 KB
testcase_15 AC 82 ms
23,640 KB
testcase_16 AC 82 ms
23,760 KB
testcase_17 AC 81 ms
21,720 KB
testcase_18 AC 82 ms
21,436 KB
testcase_19 AC 82 ms
21,616 KB
testcase_20 AC 82 ms
19,560 KB
testcase_21 AC 81 ms
21,624 KB
testcase_22 AC 82 ms
21,588 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Yuki
{
    class Program
    {
        static void Main(string[] args)
        {
            int N = int.Parse(Console.ReadLine());
            string s = Console.ReadLine();

            s = s.Replace("A", "1");
            s = s.Replace("T", "w");
            s = s.Replace("J", "x");
            s = s.Replace("Q", "y");
            s = s.Replace("K", "z");

            s = s.Replace("D", "a");
            s = s.Replace("C", "b");
            s = s.Replace("H", "c");
            s = s.Replace("S", "d");

            var li = new List<string>();
            foreach (var c in s.Split()) li.Add(c);
            li.Sort();

            s = "";
            foreach (var c in li) s += c + " ";
            s = s.Remove(s.Length - 1);

            s = s.Replace("1", "A");
            s = s.Replace("w", "T");
            s = s.Replace("x", "J");
            s = s.Replace("y", "Q");
            s = s.Replace("z", "K");

            s = s.Replace("a", "D");
            s = s.Replace("b", "C");
            s = s.Replace("c", "H");
            s = s.Replace("d", "S");

            Console.WriteLine(s);
        }
    }
}
0