結果

問題 No.804 野菜が苦手
ユーザー torus711torus711
提出日時 2019-08-11 17:12:45
言語 Haskell
(9.8.2)
結果
WA  
実行時間 -
コード長 884 bytes
コンパイル時間 837 ms
コンパイル使用メモリ 162,000 KB
実行使用メモリ 7,240 KB
最終ジャッジ日時 2023-10-11 21:17:30
合計ジャッジ時間 1,953 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 3 ms
7,148 KB
testcase_03 AC 2 ms
7,016 KB
testcase_04 AC 3 ms
7,032 KB
testcase_05 AC 2 ms
7,104 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 3 ms
7,076 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 2 ms
7,084 KB
testcase_15 AC 3 ms
7,220 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 3 ms
7,032 KB
testcase_19 AC 3 ms
7,032 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 )

Main.hs:36:1: warning: [GHC-94817] [-Wtabs]
    Tab character found here, and in one further location.
    Suggested fix: Please use spaces instead.
   |
36 |         [ a, b, c, d ] <- readInts
   | ^^^^^^^^
[2 of 2] Linking a.out

ソースコード

diff #

{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE BinaryLiterals #-}
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE NumDecimals #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TupleSections #-}

import Control.Applicative
import Control.Arrow
import Control.Monad
import Control.Monad.ST

import Data.Char
import Data.List
import Data.Maybe

import qualified Data.ByteString.Char8 as B

import Data.Array.ST.Safe
import Data.STRef

import Debug.Trace
import Text.Printf

readInt = readLn :: IO Int
readInteger = readLn :: IO Integer
readInts = map ( fst . fromJust . B.readInt ) . B.words <$> B.getLine
readIntegers = map ( fst . fromJust . B.readInteger ) . B.words <$> B.getLine

which a b f = if f then a else b
mp [ a, b ] = ( a, b )

modifyArray a i f = writeArray a i =<< f <$> readArray a i

main = do
	[ a, b, c, d ] <- readInts
	print $ min ( d `div` ( 1 + c ) ) $ max a $ b `div` c
0