摘要:
给定一个长度为n的整数数组,问有多少对互不重叠的非空区间,使得两个区间内的数的异或和为0。 暴力,每次找一个中点,找左右两边异或值一样的区间 #include<bits/stdc++.h> #define int long long #define TEST #define TESTS int _; 阅读全文
摘要:
You are preparing a ribbon to decorate the Christmas present box. You plan to dye the ribbon, initially white, to make a stripe pattern of different s 阅读全文
摘要:
Wave is given five integers \(k\), \(l_1\), \(r_1\), \(l_2\), and \(r_2\). Wave wants you to help her count the number of ordered pairs \((x, y)\) suc 阅读全文
摘要:
In the fourth labor of Rostam, the legendary hero from the Shahnameh, an old witch has created a magical maze to trap him. The maze is a rectangular g 阅读全文
摘要:
Suppose you are working in some audio streaming service. The service has \(n\) active users and \(10^9\) tracks users can listen to. Users can like tr 阅读全文
摘要:
Slavic has an array of length \(n\) consisting only of zeroes and ones. In one operation, he removes either the first or the last element of the array 阅读全文