結果
| 問題 | 
                            No.1048 Zero (Advanced)
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2020-05-08 21:43:02 | 
| 言語 | Nim  (2.2.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 591 bytes | 
| コンパイル時間 | 3,982 ms | 
| コンパイル使用メモリ | 73,300 KB | 
| 実行使用メモリ | 6,944 KB | 
| 最終ジャッジ日時 | 2024-07-04 00:19:28 | 
| 合計ジャッジ時間 | 4,709 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge1 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 4 | 
| other | AC * 12 WA * 3 | 
コンパイルメッセージ
/home/judge/data/code/Main.nim(1, 54) Warning: Use the new 'sugar' module instead; future is deprecated [Deprecated] /home/judge/data/code/Main.nim(1, 8) Warning: imported and not used: 'streams' [UnusedImport] /home/judge/data/code/Main.nim(1, 54) Warning: imported and not used: 'future' [UnusedImport] /home/judge/data/code/Main.nim(1, 76) Warning: imported and not used: 'hashes' [UnusedImport] /home/judge/data/code/Main.nim(1, 37) Warning: imported and not used: 'algorithm' [UnusedImport] /home/judge/data/code/Main.nim(1, 68) Warning: imported and not used: 'tables' [UnusedImport]
ソースコード
import streams, sequtils, strutils, algorithm, math, future, sets, tables, hashes
proc `ceilDiv`*[T](x, y: T): T = x div y + ord(x mod y != 0)
proc `//=`*(x: var SomeInteger; y: SomeInteger) = x = x div y
proc `%=`*(x: var SomeInteger; y: SomeInteger) = x = x mod y
var
    T = stdin.readLine.split.map(parseInt)
    L = T[0]
    R = T[1]
    M = T[2]
    K = T[3]
if K == 0:
    echo "Yes"
elif K mod 2 == 0:
    if (R + max(R-1, L) - (L + min(L+1, R))) * 2 >= M:
        echo "Yes"
    else:
        echo "No"
else:
    if L <= M and R >= M:
        echo "Yes"
    else:
        echo "No"