結果
| 問題 | No.227 簡単ポーカー | 
| コンテスト | |
| ユーザー |  nak2yoshi | 
| 提出日時 | 2016-02-24 11:32:48 | 
| 言語 | D (dmd 2.109.1) | 
| 結果 | 
                                CE
                                 
                            (最新) 
                                AC
                                 
                            (最初) | 
| 実行時間 | - | 
| コード長 | 413 bytes | 
| コンパイル時間 | 353 ms | 
| コンパイル使用メモリ | 101,244 KB | 
| 最終ジャッジ日時 | 2024-11-14 19:34:45 | 
| 合計ジャッジ時間 | 715 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge3 | 
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
            
            
            
            
            ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
/home/linuxbrew/.linuxbrew/opt/dmd/include/dlang/dmd/std/functional.d-mixin-224(224): Error: incompatible types for `(__a) == (__b)`: `SortedRange!(int[], "a < b", SortedRangeOptions.assumeSorted)` and `int[]`
/home/linuxbrew/.linuxbrew/opt/dmd/include/dlang/dmd/std/algorithm/comparison.d(1955): Error: template instance `std.functional.binaryFun!("a == b", "a", "b").binaryFun!(SortedRange!(int[], "a < b", SortedRangeOptions.assumeSorted), int[])` error instantiating
Main.d(14):        instantiated from here: `predSwitch!("a == b", SortedRange!(int[], "a < b", SortedRangeOptions.assumeSorted), int[], string, int[], string, int[], string, int[], string, string)`
            
            ソースコード
import std.stdio,
       std.conv,
       std.string,
       std.range,
       std.math,
       std.algorithm;
void main()
{
    auto A = readln.split.to!(int[]);
    int[int] card;
    iota(5).each!(i => card[A[i]]++);
    card.values.sort.predSwitch(
        [2, 3], "FULL HOUSE",
        [1, 1, 3], "THREE CARD",
        [1, 2, 2], "TWO PAIR",
        [1, 1, 1, 2], "ONE PAIR",
        "NO HAND").writeln;
}
            
            
            
        