結果
問題 | No.548 国士無双 |
ユーザー | pirorirori_n712 |
提出日時 | 2018-08-21 02:30:15 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 33 ms / 2,000 ms |
コード長 | 920 bytes |
コンパイル時間 | 1,165 ms |
コンパイル使用メモリ | 111,380 KB |
実行使用メモリ | 25,172 KB |
最終ジャッジ日時 | 2023-10-17 17:30:09 |
合計ジャッジ時間 | 2,711 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 33 ms
25,164 KB |
testcase_01 | AC | 32 ms
25,160 KB |
testcase_02 | AC | 32 ms
25,160 KB |
testcase_03 | AC | 32 ms
25,160 KB |
testcase_04 | AC | 32 ms
25,160 KB |
testcase_05 | AC | 32 ms
25,160 KB |
testcase_06 | AC | 32 ms
25,164 KB |
testcase_07 | AC | 32 ms
25,160 KB |
testcase_08 | AC | 32 ms
25,164 KB |
testcase_09 | AC | 32 ms
25,160 KB |
testcase_10 | AC | 32 ms
25,164 KB |
testcase_11 | AC | 32 ms
25,164 KB |
testcase_12 | AC | 32 ms
25,160 KB |
testcase_13 | AC | 32 ms
25,164 KB |
testcase_14 | AC | 32 ms
25,160 KB |
testcase_15 | AC | 32 ms
25,160 KB |
testcase_16 | AC | 32 ms
25,164 KB |
testcase_17 | AC | 32 ms
25,164 KB |
testcase_18 | AC | 32 ms
25,164 KB |
testcase_19 | AC | 32 ms
25,160 KB |
testcase_20 | AC | 31 ms
25,124 KB |
testcase_21 | AC | 32 ms
25,160 KB |
testcase_22 | AC | 31 ms
25,124 KB |
testcase_23 | AC | 32 ms
25,172 KB |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; using System.Linq; using System.Collections.Generic; class No548 { static void Main() { var str = Console.ReadLine().OrderBy(x => x); var count = str.Distinct().Count(); char[] strArray = new char[] { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm' }; List<char> ansList = new List<char>(); if (count < 12) { Console.WriteLine("Impossible"); return; } else if (count == 12) { for (int i = 0; i < 13; ++i) { if (!str.Contains(strArray[i])) { ansList.Add(strArray[i]); break; } } } else { ansList.AddRange(strArray); } foreach (var ans in ansList) { Console.WriteLine(ans); } } }