結果

問題 No.290 1010
ユーザー vain0vain0
提出日時 2015-10-16 23:04:51
言語 F#
(.NET 7)
結果
AC  
実行時間 127 ms / 5,000 ms
コード長 341 bytes
コンパイル時間 4,699 ms
コンパイル使用メモリ 168,076 KB
実行使用メモリ 27,212 KB
最終ジャッジ日時 2023-09-29 01:36:10
合計ジャッジ時間 8,418 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 103 ms
21,920 KB
testcase_01 AC 104 ms
25,832 KB
testcase_02 AC 98 ms
23,644 KB
testcase_03 AC 105 ms
25,832 KB
testcase_04 AC 105 ms
25,804 KB
testcase_05 AC 99 ms
21,600 KB
testcase_06 AC 99 ms
23,540 KB
testcase_07 AC 97 ms
25,604 KB
testcase_08 AC 97 ms
25,644 KB
testcase_09 AC 98 ms
23,556 KB
testcase_10 AC 98 ms
23,540 KB
testcase_11 AC 97 ms
23,540 KB
testcase_12 AC 102 ms
23,880 KB
testcase_13 AC 103 ms
25,740 KB
testcase_14 AC 98 ms
25,648 KB
testcase_15 AC 98 ms
23,672 KB
testcase_16 AC 97 ms
25,608 KB
testcase_17 AC 96 ms
23,636 KB
testcase_18 AC 97 ms
23,612 KB
testcase_19 AC 97 ms
23,568 KB
testcase_20 AC 107 ms
27,108 KB
testcase_21 AC 115 ms
27,212 KB
testcase_22 AC 127 ms
27,160 KB
testcase_23 AC 107 ms
25,216 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) F# Compiler version 11.0.0.0 for F# 5.0
Copyright (c) Microsoft Corporation. All Rights Reserved.

ソースコード

diff #

open System
open System.Text
open System.Collections.Generic

[<EntryPoint>]
let main argv =
  let n = Console.ReadLine() |> Int32.Parse
  let s = Console.ReadLine()

  let solve () =
    ["00"; "11"; "1010"; "0101"] |> List.exists (fun pattern -> s.IndexOf(pattern) >= 0)

  printfn "%s" <| (if solve () then "YES" else "NO")

  //exit
  0
0