結果

問題 No.3155 Same Birthday
コンテスト
ユーザー kou_kkk
提出日時 2026-04-11 01:53:32
言語 F#
(F# 10.0)
コンパイル:
fsharp_c _filename_
実行:
/usr/bin/dotnet_wrap
結果
AC  
実行時間 128 ms / 2,000 ms
コード長 346 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 8,945 ms
コンパイル使用メモリ 219,112 KB
実行使用メモリ 65,448 KB
最終ジャッジ日時 2026-04-11 01:53:54
合計ジャッジ時間 18,715 ms
ジャッジサーバーID
(参考情報)
judge1_1 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 49
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.fsproj を復元しました (322 ミリ秒)。
/home/judge/data/code/Main.fs(7,9): warning FS0025: この式のパターン マッチが不完全です たとえば、値 '[|_; _; _|]' はパターンに含まれないケースを示す可能性があります。 [/home/judge/data/code/main.fsproj]
  main -> /home/judge/data/code/bin/Release/net10.0/main.dll
  main -> /home/judge/data/code/bin/Release/net10.0/publish/

ソースコード

diff #
raw source code

let cnt = Array.zeroCreate<int> 1010000
let mutable flg = false

let n = stdin.ReadLine() |> int

for i = 1 to n do
    let [| a; b|] =
        stdin.ReadLine().Split()
        |> Array.map int
    let x = a * 1000 + b
    cnt.[x] <- cnt.[x] + 1
    if not flg && cnt.[x] >= 2 then
        flg <- true

if flg then "Yes"
else "No"
|> printfn "%s"
0