結果

問題 No.1142 XOR と XOR
ユーザー yuruhiyayuruhiya
提出日時 2021-03-18 18:42:15
言語 Ruby
(3.3.0)
結果
AC  
実行時間 393 ms / 2,000 ms
コード長 180 bytes
コンパイル時間 87 ms
コンパイル使用メモリ 11,424 KB
実行使用メモリ 30,960 KB
最終ジャッジ日時 2023-08-07 22:29:49
合計ジャッジ時間 11,036 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 275 ms
30,712 KB
testcase_01 AC 281 ms
30,652 KB
testcase_02 AC 277 ms
30,904 KB
testcase_03 AC 393 ms
25,688 KB
testcase_04 AC 365 ms
25,056 KB
testcase_05 AC 349 ms
25,008 KB
testcase_06 AC 367 ms
25,160 KB
testcase_07 AC 382 ms
24,392 KB
testcase_08 AC 389 ms
25,400 KB
testcase_09 AC 387 ms
25,296 KB
testcase_10 AC 386 ms
25,448 KB
testcase_11 AC 271 ms
30,752 KB
testcase_12 AC 272 ms
30,708 KB
testcase_13 AC 271 ms
30,960 KB
testcase_14 AC 330 ms
24,708 KB
testcase_15 AC 328 ms
24,404 KB
testcase_16 AC 281 ms
30,864 KB
testcase_17 AC 354 ms
23,980 KB
testcase_18 AC 288 ms
23,536 KB
testcase_19 AC 366 ms
25,340 KB
testcase_20 AC 330 ms
24,376 KB
testcase_21 AC 308 ms
24,448 KB
testcase_22 AC 291 ms
24,032 KB
testcase_23 AC 360 ms
25,080 KB
testcase_24 AC 370 ms
25,160 KB
testcase_25 AC 327 ms
24,620 KB
testcase_26 AC 363 ms
25,136 KB
testcase_27 AC 345 ms
24,732 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

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