結果
| 問題 | No.2888 Mamehinata |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-09-13 21:29:36 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 272 bytes |
| 記録 | |
| コンパイル時間 | 595 ms |
| コンパイル使用メモリ | 85,376 KB |
| 実行使用メモリ | 95,232 KB |
| 最終ジャッジ日時 | 2026-04-04 07:58:00 |
| 合計ジャッジ時間 | 5,194 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 TLE * 1 -- * 41 |
ソースコード
n,m=map(int,input().split())
a=[[]for i in range(n)]
for i in range(m):
s,t=map(int,input().split())
a[s-1].append(t-1)
a[t-1].append(s-1)
now={0}
for _ in range(n):
new=set()
for i in now:
for j in a[i]:
if j not in now:
new.add(j)
now=new
print(len(now))