結果

問題 No.2171 OR Assignment
ユーザー 👑 p-adicp-adic
提出日時 2023-06-23 08:47:47
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 743 ms / 3,500 ms
コード長 202 bytes
コンパイル時間 312 ms
コンパイル使用メモリ 87,132 KB
実行使用メモリ 110,572 KB
最終ジャッジ日時 2023-09-13 03:50:07
合計ジャッジ時間 13,321 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,272 KB
testcase_01 AC 71 ms
71,124 KB
testcase_02 AC 71 ms
71,344 KB
testcase_03 AC 71 ms
71,428 KB
testcase_04 AC 70 ms
71,440 KB
testcase_05 AC 71 ms
71,264 KB
testcase_06 AC 71 ms
71,632 KB
testcase_07 AC 72 ms
71,132 KB
testcase_08 AC 70 ms
71,604 KB
testcase_09 AC 71 ms
71,452 KB
testcase_10 AC 71 ms
71,112 KB
testcase_11 AC 69 ms
71,348 KB
testcase_12 AC 231 ms
103,816 KB
testcase_13 AC 225 ms
103,808 KB
testcase_14 AC 227 ms
103,804 KB
testcase_15 AC 137 ms
108,284 KB
testcase_16 AC 150 ms
108,340 KB
testcase_17 AC 160 ms
103,548 KB
testcase_18 AC 467 ms
103,788 KB
testcase_19 AC 452 ms
108,304 KB
testcase_20 AC 685 ms
108,284 KB
testcase_21 AC 692 ms
108,160 KB
testcase_22 AC 738 ms
108,372 KB
testcase_23 AC 531 ms
110,452 KB
testcase_24 AC 741 ms
110,296 KB
testcase_25 AC 731 ms
110,012 KB
testcase_26 AC 739 ms
109,328 KB
testcase_27 AC 677 ms
109,384 KB
testcase_28 AC 647 ms
109,300 KB
testcase_29 AC 607 ms
110,300 KB
testcase_30 AC 571 ms
110,460 KB
testcase_31 AC 743 ms
110,572 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

I=input
L=I()
L=1<<30
B=[[0,1]]
for a in list(map(int,I().split()))+[0]:
	s,c,C=0,L,[]
	for b in B:s,c,C=(s+b[1])%998244353,a|b[0],C+[[],[[c,s]]][c>a|b[0]]
	B=C+[[c,s]]+[[],[[a,s]]][c>a]
print(B[-1][1])
0