結果
| 問題 | No.26 シャッフルゲーム |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-07-30 00:45:46 |
| 言語 | Nim (2.2.6) |
| 結果 |
CE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 547 bytes |
| 記録 | |
| コンパイル時間 | 634 ms |
| コンパイル使用メモリ | 70,412 KB |
| 最終ジャッジ日時 | 2026-03-19 18:51:39 |
| 合計ジャッジ時間 | 984 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
/home/judge/data/code/Main.nim(1, 50) Warning: Use the new 'sugar' module instead; future is deprecated [Deprecated] /home/judge/data/code/Main.nim(13, 2) template/generic instantiation of `times` from here /home/judge/data/code/Main.nim(15, 28) Error: tuple expected for tuple unpacking, but got 'seq[int]'
ソースコード
import sequtils,strutils,strscans,algorithm,math,future,sets template get():string = stdin.readLine() template times(n:int,body:untyped): untyped = (for _ in 0..<n: body) template REP(i:untyped,n:int,body:untyped):untyped = block:(var i = 0; while i < n:( body; i += 1)) ################################################################### var A = newSeq[bool](4) let N = get().parseInt M = get().parseInt A[N] = true M.times: var P,Q:int (P,Q) = get().split().map(parseInt) (A[P],A[Q]) = (A[Q],A[P]) for i in 1..3: if A[i] : echo i