結果

問題 No.1142 XOR と XOR
ユーザー yuruhiyayuruhiya
提出日時 2021-03-18 18:39:26
言語 Ruby
(3.3.0)
結果
AC  
実行時間 484 ms / 2,000 ms
コード長 186 bytes
コンパイル時間 152 ms
コンパイル使用メモリ 7,424 KB
実行使用メモリ 47,232 KB
最終ジャッジ日時 2024-04-25 16:48:51
合計ジャッジ時間 12,496 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 284 ms
16,640 KB
testcase_01 AC 289 ms
16,768 KB
testcase_02 AC 292 ms
16,640 KB
testcase_03 AC 477 ms
47,232 KB
testcase_04 AC 450 ms
41,984 KB
testcase_05 AC 404 ms
38,400 KB
testcase_06 AC 446 ms
42,752 KB
testcase_07 AC 476 ms
46,848 KB
testcase_08 AC 481 ms
46,976 KB
testcase_09 AC 481 ms
46,976 KB
testcase_10 AC 484 ms
46,976 KB
testcase_11 AC 293 ms
16,768 KB
testcase_12 AC 293 ms
16,640 KB
testcase_13 AC 290 ms
16,640 KB
testcase_14 AC 387 ms
35,328 KB
testcase_15 AC 383 ms
35,200 KB
testcase_16 AC 301 ms
23,040 KB
testcase_17 AC 414 ms
40,448 KB
testcase_18 AC 320 ms
26,112 KB
testcase_19 AC 451 ms
42,624 KB
testcase_20 AC 391 ms
35,328 KB
testcase_21 AC 350 ms
30,080 KB
testcase_22 AC 330 ms
26,496 KB
testcase_23 AC 425 ms
40,448 KB
testcase_24 AC 461 ms
43,776 KB
testcase_25 AC 384 ms
34,432 KB
testcase_26 AC 451 ms
42,496 KB
testcase_27 AC 396 ms
38,400 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

k,*x=$<.map &:split
x,y=x.map{|a|c=1,*t=[i=x=0]*1024
a.map{c[x^=_1.to_i]+=1}
t.map{t[0]+=(q=c[i])*~-q/2;(0...i).map{t[_1^i]+=q*c[_1]};i+=1}
t}
l=-1;p x.sum{_1*y[k[2].to_i^l+=1]}.%10**9+7
0