結果
| 問題 | No.462 6日知らずのコンピュータ |
| コンテスト | |
| ユーザー |
taba
|
| 提出日時 | 2017-04-03 12:30:02 |
| 言語 | Python3 (3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 26 ms / 2,000 ms |
| + 163µs | |
| コード長 | 273 bytes |
| 記録 | |
| コンパイル時間 | 50 ms |
| コンパイル使用メモリ | 14,592 KB |
| 実行使用メモリ | 11,648 KB |
| 最終ジャッジ日時 | 2026-10-16 10:37:07 |
| 合計ジャッジ時間 | 5,761 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 85 |
ソースコード
import math n,k=map(int,input().split()) b=lambda x:sum(i=="1" for i in bin(x)) if k<1: a=[] else: a=sorted(map(int,input().split())) f=0 c=1 for i in a: if i&f!=f: print(0) exit() t=b(i^f) c*=math.factorial(t) f=i t=n-b(f) c*=math.factorial(t) print(c%(10**9+7))
taba