結果

問題 No.3155 Same Birthday
ユーザー bluemegane
提出日時 2025-05-24 06:22:24
言語 C#
(.NET 8.0.404)
結果
WA  
実行時間 -
コード長 571 bytes
コンパイル時間 8,240 ms
コンパイル使用メモリ 170,372 KB
実行使用メモリ 187,248 KB
最終ジャッジ日時 2025-05-24 06:22:41
合計ジャッジ時間 12,828 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 1
other AC * 26 WA * 23
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.csproj を復元しました (94 ミリ秒)。
  main -> /home/judge/data/code/bin/Release/net8.0/main.dll
  main -> /home/judge/data/code/bin/Release/net8.0/publish/

ソースコード

diff #

using System.Collections.Generic;
using System;

public class Hello
{
    static void Main()
    {
        var n = int.Parse(Console.ReadLine().Trim());
        getAns(n);
    }
    static void getAns(int n)
    {
        var hs = new HashSet<(int, int)>();
        for (int i = 0; i < n; i++)
        {
            string[] line = Console.ReadLine().Trim().Split(' ');
            var a = int.Parse(line[0]);
            var b = int.Parse(line[1]);
            if (hs.Add((a, b))) { Console.WriteLine("Yes"); return; }
        }
        Console.WriteLine("No");
    }
}
0