結果
問題 | No.754 畳み込みの和 |
ユーザー |
|
提出日時 | 2018-12-02 04:43:17 |
言語 | Haskell (9.10.1) |
結果 |
AC
|
実行時間 | 749 ms / 5,000 ms |
コード長 | 318 bytes |
コンパイル時間 | 4,661 ms |
コンパイル使用メモリ | 174,208 KB |
実行使用メモリ | 160,384 KB |
最終ジャッジ日時 | 2024-06-27 15:45:29 |
合計ジャッジ時間 | 8,141 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 3 |
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.8.2/environments/default [1 of 2] Compiling Main ( Main.hs, Main.o ) [2 of 2] Linking a.out
ソースコード
-- Try yukicoder-- author: Leonardone @ NEETSDKASUmain = interact $ show . solve . map read . wordsmod109 = (`mod` (10^9 + 7))solve (n:vs) = ans where(xs, ys) = splitAt (n+1) vszs = zip xs (reverse ys)ans = fst $ foldl f (0, 0) zsf (a, s) (x, y) = (mod109 $ a + y * (s + x), mod109 $ s + x)