結果
| 問題 | No.522 Make Test Cases(テストケースを作る) |
| コンテスト | |
| ユーザー |
くれちー
|
| 提出日時 | 2017-06-02 23:11:14 |
| 言語 | Haskell (9.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 318 bytes |
| 記録 | |
| コンパイル時間 | 6,526 ms |
| コンパイル使用メモリ | 192,000 KB |
| 実行使用メモリ | 16,512 KB |
| 最終ジャッジ日時 | 2026-04-10 08:29:55 |
| 合計ジャッジ時間 | 15,036 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 TLE * 1 |
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.14.1/environments/default [1 of 2] Compiling Main ( Main.hs, Main.o ) [2 of 2] Linking a.out
ソースコード
import Control.Monad (guard)
import Text.Printf (printf)
main :: IO ()
main = mapM_ (\(a, b, c) -> printf "%d %d %d\n" a b c) . solve =<< readLn
solve :: Int -> [(Int, Int, Int)]
solve n = do
a <- [1 .. n]; b <- [1 .. n]; c <- [1 .. n]
guard $ a + b + c == n
guard $ a <= b && b <= c
return (a, b, c)
くれちー