結果
| 問題 | No.3275 Minesweeper on Graph |
| コンテスト | |
| ユーザー |
miztom
|
| 提出日時 | 2025-09-19 23:20:11 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 82 ms / 2,000 ms |
| + 683µs | |
| コード長 | 290 bytes |
| 記録 | |
| コンパイル時間 | 238 ms |
| コンパイル使用メモリ | 96,116 KB |
| 実行使用メモリ | 84,480 KB |
| 最終ジャッジ日時 | 2026-07-15 04:07:43 |
| 合計ジャッジ時間 | 8,386 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 40 |
ソースコード
n,m=map(int,input().split())
A=[*map(int,input().split())]
g=[0]*n
for i in range(m):
a,b=map(int,input().split())
g[a-1]|=1<<b-1;g[b-1]|=1<<a-1
for i in range(1<<n):
if all((i&g[j]).bit_count()==A[j]for j in range(n)):exit(print("Yes")or print(*f"{i:0{n}b}"[::-1]))
print("No")
miztom