結果
| 問題 | No.792 真理関数をつくろう | 
| コンテスト | |
| ユーザー |  rythem00359 | 
| 提出日時 | 2020-08-17 14:44:39 | 
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) | 
| 結果 | 
                                TLE
                                 
                            (最新) 
                                AC
                                 
                            (最初) | 
| 実行時間 | - | 
| コード長 | 357 bytes | 
| コンパイル時間 | 98 ms | 
| コンパイル使用メモリ | 12,672 KB | 
| 実行使用メモリ | 19,116 KB | 
| 最終ジャッジ日時 | 2024-10-11 11:03:58 | 
| 合計ジャッジ時間 | 6,236 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | -- * 4 | 
| other | AC * 21 TLE * 1 | 
ソースコード
N=int(input())
ans="A="
count=0
for i in range(2**N):
    a=[*map(int,input().split())]
    if a[-1]==1:
        count+=1
        ans+='('
        for j in range(1,N+1):
            if a[j-1]==0:
                ans+=('¬')
            ans+='P_'+str(j)+'∧'
        ans=ans[:-1]+')∨'
print(ans[:-1] if 0<count<2**N else 'A=⊥' if count==0 else 'A=⊤')
            
            
            
        