結果
| 問題 |
No.870 無敵囲い
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-09-03 03:35:40 |
| 言語 | Nim (2.2.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 300 ms |
| コード長 | 433 bytes |
| コンパイル時間 | 2,049 ms |
| コンパイル使用メモリ | 61,084 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-29 06:22:28 |
| 合計ジャッジ時間 | 2,713 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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"