結果
| 問題 | No.24 数当てゲーム |
| コンテスト | |
| ユーザー |
とばり
|
| 提出日時 | 2018-09-22 19:56:29 |
| 言語 | Nim (2.2.8) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 500 bytes |
| 記録 | |
| コンパイル時間 | 3,947 ms |
| コンパイル使用メモリ | 72,272 KB |
| 実行使用メモリ | 7,716 KB |
| 最終ジャッジ日時 | 2026-03-21 23:08:27 |
| 合計ジャッジ時間 | 3,189 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 |
コンパイルメッセージ
/home/judge/data/code/Main.nim(16, 23) Warning: type 'int' is too big to be a `set` element, assuming a range of 0..65535, explicitly write this range to get rid of warning [AboveMaxSizeSet] /home/judge/data/code/Main.nim(18, 14) Warning: type 'int' is too big to be a `set` element, assuming a range of 0..65535, explicitly write this range to get rid of warning [AboveMaxSizeSet]
ソースコード
import strutils, sequtils
let n = parseInt(readLine(stdin))
var exists: array[10, bool]
for i in 0..9: exists[i] = true
for i in 0..<n:
let
tokens = readLine(stdin).split()
nums = map(tokens[0..3], proc(x: string): int = parseInt(x))
(a, b, c, d) = (nums[0], nums[1], nums[2], nums[3])
r = tokens[4]
if r == "YES":
for d in {0..9} - {a,b,c,d}: exists[d] = false
else:
for d in {a,b,c,d}: exists[d] = false
for d in 0..9:
if exists[d]: echo d
とばり