結果
| 問題 | No.20 砂漠のオアシス | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2019-02-05 10:01:10 | 
| 言語 | Nim (2.2.0) | 
| 結果 | 
                                CE
                                 
                            (最新) 
                                AC
                                 
                            (最初) | 
| 実行時間 | - | 
| コード長 | 645 bytes | 
| コンパイル時間 | 1,019 ms | 
| コンパイル使用メモリ | 66,576 KB | 
| 最終ジャッジ日時 | 2024-11-14 21:14:17 | 
| 合計ジャッジ時間 | 1,603 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge3 | 
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
            
            
            
            
            ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
/home/judge/data/code/Main.nim(2, 10) Warning: Deprecated since v1.5; Use auto instead.; any is deprecated [Deprecated] /home/judge/data/code/Main.nim(6, 42) Error: undeclared identifier: 'newHeapQueue' candidates (edit distance, scope distance); see '--spellSuggest': (3, 2): 'heapqueue' (3, 4): 'initHeapQueue' (3, 4): 'toHeapQueue'
ソースコード
import sequtils,strutils,heapqueue proc r():any=stdin.readLine.split.map parseInt let(n,v,ox,oy)=(let t=r();(t[0],t[1],t[3]-1,t[2]-1)) let L=newSeqWith(n,r()) proc T(sx,sy,sv,c:int)= var(C,O)=(newSeqWith(n,newSeq[bool](n)),newHeapQueue[tuple[v,x,y:int]]()) O.push (-sv,sx,sy) while O.len>0: var(v,x,y)=O.pop() if C[x][y]:continue C[x][y]=true if c==1 and x==ox and y==oy:(T(x,y,-v*2,0);continue) for d in[(x,y+1),(x+1,y),(x,y-1),(x-1,y)]: if d[0]<0 or d[1]<0 or d[0]>=n or d[1]>=n or -v-L[d[0]][d[1]]<=0 or C[d[0]][d[1]]:continue O.push (v+L[d[0]][d[1]],d[0],d[1]) if d[0]==n-1 and d[1]==n-1:quit "YES",0 T 0,0,v,1 echo"NO"
