結果

問題 No.1142 XOR と XOR
ユーザー yuruhiyayuruhiya
提出日時 2021-03-18 18:36:24
言語 Ruby
(3.3.0)
結果
AC  
実行時間 472 ms / 2,000 ms
コード長 189 bytes
コンパイル時間 54 ms
コンパイル使用メモリ 7,680 KB
実行使用メモリ 50,304 KB
最終ジャッジ日時 2024-04-25 16:49:04
合計ジャッジ時間 12,019 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 282 ms
16,768 KB
testcase_01 AC 278 ms
16,768 KB
testcase_02 AC 272 ms
16,512 KB
testcase_03 AC 472 ms
50,304 KB
testcase_04 AC 434 ms
44,544 KB
testcase_05 AC 382 ms
40,448 KB
testcase_06 AC 437 ms
45,184 KB
testcase_07 AC 471 ms
49,792 KB
testcase_08 AC 470 ms
50,176 KB
testcase_09 AC 465 ms
50,176 KB
testcase_10 AC 466 ms
50,048 KB
testcase_11 AC 274 ms
16,512 KB
testcase_12 AC 279 ms
16,512 KB
testcase_13 AC 274 ms
16,768 KB
testcase_14 AC 370 ms
37,248 KB
testcase_15 AC 364 ms
36,864 KB
testcase_16 AC 301 ms
23,424 KB
testcase_17 AC 406 ms
42,624 KB
testcase_18 AC 304 ms
26,624 KB
testcase_19 AC 440 ms
45,312 KB
testcase_20 AC 376 ms
37,120 KB
testcase_21 AC 341 ms
31,104 KB
testcase_22 AC 318 ms
27,264 KB
testcase_23 AC 416 ms
41,856 KB
testcase_24 AC 452 ms
46,336 KB
testcase_25 AC 374 ms
36,096 KB
testcase_26 AC 443 ms
45,184 KB
testcase_27 AC 393 ms
40,320 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

k,*x=$<.map{_1.split.map &:to_i}
x,y=x.map{|a|c=1,*t=[i=x=0]*1024
a.map{c[x^=_1]+=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]^l+=1]}.%10**9+7
0