結果
| 問題 |
No.3275 Minesweeper on Graph
|
| コンテスト | |
| ユーザー |
miztom
|
| 提出日時 | 2025-09-19 23:06:27 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 286 bytes |
| コンパイル時間 | 346 ms |
| コンパイル使用メモリ | 82,784 KB |
| 実行使用メモリ | 76,544 KB |
| 最終ジャッジ日時 | 2025-09-19 23:06:35 |
| 合計ジャッジ時間 | 7,012 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 17 WA * 23 |
ソースコード
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\n"+" ".join(f"{i:0{n}b}")))
print("No")
miztom