結果
| 問題 | No.870 無敵囲い |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-09-03 03:35:40 |
| 言語 | Nim (2.2.8) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 300 ms |
| コード長 | 433 bytes |
| 記録 | |
| コンパイル時間 | 2,459 ms |
| コンパイル使用メモリ | 69,584 KB |
| 実行使用メモリ | 7,716 KB |
| 最終ジャッジ日時 | 2026-03-18 16:24:46 |
| 合計ジャッジ時間 | 3,131 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 18 |
コンパイルメッセージ
/home/judge/data/code/Main.nim(1, 8) Warning: imported and not used: 'sequtils' [UnusedImport]
ソースコード
import sequtils
proc scanf(formatstr: cstring){.header: "<stdio.h>", varargs.}
proc scan(): int = scanf("%lld\n",addr result)
let n = scan()
proc toI(x,y:int):int = x * 10 + y
var poses = @[toI(2,8),toI(3,9),toI(7,9)]
for _ in 0..<n:
let a = toI(scan(),scan())
let b = toI(scan(),scan())
for i in 0..<3:
if poses[i] == a:
poses[i] = b
break
if poses == @[toI(5,8),toI(4,8),toI(6,8)]: echo "YES"
else: echo "NO"