結果

問題 No.587 七対子
コンテスト
ユーザー toshiro_yanagi
提出日時 2018-06-15 18:52:48
言語 Nim
(2.2.8)
コンパイル:
nim --nimcache=~ --hints:off -o:a.out -d:release cpp _filename_
実行:
./a.out
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 240 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 2,546 ms
コンパイル使用メモリ 69,824 KB
実行使用メモリ 77,336 KB
最終ジャッジ日時 2026-04-02 18:10:32
合計ジャッジ時間 3,729 ms
ジャッジサーバーID
(参考情報)
judge5_0 / judge1_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 35
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import tables
var S = initCountTable[char]()

for s in stdin.readLine:
  S.inc s

if S.largest.val == 2:
  let ss = S.smallest
  if ss.val == 1:
    S.inc ss.key
    if S.smallest.val == 2:
      echo ss.key
      quit()

echo "Impossible"
0