結果
| 問題 | No.547 未知の言語 |
| コンテスト | |
| ユーザー |
okaduki
|
| 提出日時 | 2017-07-28 22:35:31 |
| 言語 | Haskell (9.14.1) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 614 bytes |
| 記録 | |
| コンパイル時間 | 1,937 ms |
| コンパイル使用メモリ | 207,996 KB |
| 実行使用メモリ | 7,720 KB |
| 最終ジャッジ日時 | 2026-03-12 14:49:08 |
| 合計ジャッジ時間 | 2,908 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 33 |
コンパイルメッセージ
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
ソースコード
{-# LANGUAGE FlexibleContexts, OverloadedStrings #-}
import Control.Applicative
import Control.Monad
import qualified Data.ByteString.Char8 as B
import Data.Maybe (fromJust)
import Text.Printf
import Debug.Trace
solve (s:ss) (t:ts) n =
if s /= t then
print n >> B.putStrLn s >> B.putStrLn t
else
solve ss ts (n+1)
main = do
[n] <- getInts
s <- B.words <$> B.getLine
t <- B.words <$> B.getLine
solve s t 1
-- util
getInts :: IO [Int]
getInts = map (fst . fromJust . B.readInt) . B.words <$> B.getLine
substr :: Int -> Int -> B.ByteString -> B.ByteString
substr b l s = B.take l $ B.drop b s
okaduki