結果

問題 No.1741 Arrays and XOR Procedure
ユーザー Eki1009Eki1009
提出日時 2021-11-12 22:20:36
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 133 ms / 2,000 ms
コード長 269 bytes
コンパイル時間 284 ms
コンパイル使用メモリ 87,076 KB
実行使用メモリ 110,940 KB
最終ジャッジ日時 2023-08-17 02:05:53
合計ジャッジ時間 7,037 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,420 KB
testcase_01 AC 72 ms
71,424 KB
testcase_02 AC 77 ms
71,452 KB
testcase_03 AC 127 ms
110,940 KB
testcase_04 AC 74 ms
71,512 KB
testcase_05 AC 121 ms
110,248 KB
testcase_06 AC 133 ms
110,736 KB
testcase_07 AC 131 ms
110,864 KB
testcase_08 AC 117 ms
109,968 KB
testcase_09 AC 126 ms
106,256 KB
testcase_10 AC 127 ms
106,472 KB
testcase_11 AC 116 ms
99,588 KB
testcase_12 AC 108 ms
94,460 KB
testcase_13 AC 123 ms
106,172 KB
testcase_14 AC 112 ms
96,808 KB
testcase_15 AC 120 ms
103,036 KB
testcase_16 AC 88 ms
76,624 KB
testcase_17 AC 100 ms
85,528 KB
testcase_18 AC 114 ms
96,940 KB
testcase_19 AC 82 ms
76,392 KB
testcase_20 AC 132 ms
110,484 KB
testcase_21 AC 120 ms
102,524 KB
testcase_22 AC 114 ms
99,492 KB
testcase_23 AC 95 ms
83,740 KB
testcase_24 AC 84 ms
76,612 KB
testcase_25 AC 133 ms
110,476 KB
testcase_26 AC 100 ms
88,532 KB
testcase_27 AC 81 ms
76,724 KB
testcase_28 AC 116 ms
99,728 KB
testcase_29 AC 122 ms
102,984 KB
testcase_30 AC 116 ms
99,764 KB
testcase_31 AC 83 ms
76,612 KB
testcase_32 AC 101 ms
88,476 KB
testcase_33 AC 107 ms
92,176 KB
testcase_34 AC 91 ms
81,108 KB
testcase_35 AC 76 ms
71,196 KB
testcase_36 AC 86 ms
76,760 KB
testcase_37 AC 101 ms
88,412 KB
testcase_38 AC 133 ms
110,232 KB
testcase_39 AC 101 ms
86,744 KB
testcase_40 AC 84 ms
76,600 KB
testcase_41 AC 96 ms
80,288 KB
testcase_42 AC 86 ms
76,780 KB
testcase_43 AC 74 ms
71,528 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

mod = 998244353
n,*B = map(int,open(0).read().split())
x,y = 1,0
for k,b in enumerate(B):
    s = t = 0
    if b != 0:
        s,t = (s+x)%mod,(y+t)%mod
        if n-1&k == k:
            s,t = t,s
    if b != 1:
        s,t = (s+x)%mod,(y+t)%mod
    x,y = s,t
print(y)
0