結果
| 問題 |
No.3219 Ruler to Maximize
|
| コンテスト | |
| ユーザー |
sasa8uyauya
|
| 提出日時 | 2025-08-01 22:11:40 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 273 bytes |
| コンパイル時間 | 267 ms |
| コンパイル使用メモリ | 82,544 KB |
| 実行使用メモリ | 76,200 KB |
| 最終ジャッジ日時 | 2025-08-01 22:11:48 |
| 合計ジャッジ時間 | 6,307 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 1 WA * 31 |
ソースコード
n=int(input())
a=list(map(int,input().split()))
ans=(0,["W"]*n)
l=14
for i in range(1<<l):
w=0
b=0
c=[]
for v in a:
if i|v==i:
w|=v
c+=["W"]
else:
b|=v
c+=["B"]
if w==i:
ans=max(ans,(w*b,c))
print(ans[0])
print("".join(ans[1]))
sasa8uyauya