結果
問題 |
No.3155 Same Birthday
|
ユーザー |
|
提出日時 | 2025-07-18 11:00:26 |
言語 | Java (openjdk 23) |
結果 |
TLE
|
実行時間 | - |
コード長 | 783 bytes |
コンパイル時間 | 6,609 ms |
コンパイル使用メモリ | 76,984 KB |
実行使用メモリ | 76,092 KB |
最終ジャッジ日時 | 2025-07-18 11:00:40 |
合計ジャッジ時間 | 10,361 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | -- * 2 |
other | AC * 1 TLE * 1 -- * 47 |
ソースコード
class main{ public static void main(String[] args){ java.util.Scanner sc= new java.util.Scanner(System.in); int N=sc.nextInt(); int Yescount=0; String[] Getu=new String[N]; String[] Date=new String[N]; for(int i=0; i<N; i++){ Getu[i] = sc.next(); Date[i] = sc.next(); } for (int i = 0; i < N; i++) { for (int j = i + 1; j < N; j++) { if (Getu[i].equals(Getu[j]) && Date[i].equals(Date[j])) { System.out.println("Yes"); Yescount++; return; } } } if (Yescount == 0) { System.out.println("No"); } } }