結果

問題 No.513 宝探し2
ユーザー ducktailducktail
提出日時 2018-07-11 14:35:42
言語 Haskell
(9.8.2)
結果
AC  
実行時間 39 ms / 2,000 ms
コード長 408 bytes
コンパイル時間 6,015 ms
コンパイル使用メモリ 164,428 KB
実行使用メモリ 24,396 KB
平均クエリ数 2.75
最終ジャッジ日時 2023-09-24 01:49:13
合計ジャッジ時間 2,273 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
24,024 KB
testcase_01 AC 23 ms
23,424 KB
testcase_02 AC 23 ms
23,676 KB
testcase_03 AC 24 ms
24,228 KB
testcase_04 AC 25 ms
24,396 KB
testcase_05 AC 24 ms
23,688 KB
testcase_06 AC 25 ms
23,556 KB
testcase_07 AC 23 ms
23,556 KB
testcase_08 AC 24 ms
23,436 KB
testcase_09 AC 23 ms
23,856 KB
testcase_10 AC 23 ms
23,652 KB
testcase_11 AC 23 ms
24,060 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.6.1/environments/default
[1 of 2] Compiling Main             ( Main.hs, Main.o )
[2 of 2] Linking a.out

ソースコード

diff #

import System.IO (hFlush, stdout)
import Control.Monad (unless)

main :: IO ()
main = do
  putStrLn "0 0"
  hFlush stdout
  d1 <- readLn
  unless (d1 == 0) $ do
    putStrLn "100000 0"
    hFlush stdout
    d2 <- readLn
    unless (d2 == 0) $ do
      let ay = (d1 + d2 - 100000) `div` 2
      let ax = d1 - ay
      putStrLn $ unwords $ map show $ [ax, ay]
      hFlush stdout
      getLine
      return ()
0