秋招模拟赛第39场|2023.09.02-淘天-研发
- Status
- Done
- Rule
- IOI
- Problem
- 3
- Start at
- 2023-9-6 19:00
- End at
- 2023-9-6 20:12
- Duration
- 1.2 hour(s)
- Host
- Partic.
- 25
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
塔子哥有一个长度为n的数组a,他想知道有多少对{ai,aj,ak,al},(i<j<k<l)满足ai+aj=ak⊕al
答案可能太大,请对109+7取模后再输出。
第一行一个正整数n。 第二行n个正整数ai
1≤n≤104
1≤ai≤100
一个整数,表示对109+7取模后的答案。
输入
5
4 5 5 1 8
输出
2
说明
满足要求的四元组有(1,2,4,5)和(1,3,4,5),即:4+5=1⊕8=9
扫码备注加群即可,期待您的到来~
By signing up a CodeFun2000 universal account, you can submit code and join discussions in all online judging services provided by us.