For the daily milking, Farmer John's N cows (1 ≤ N ≤ 50,000) always line up in the same order. One day Farmer John decides to organize a game of Ultimate Frisbee with some of the cows. To keep things simple, he will take a contiguous range of cows fr
题目链接 A. Sereja and Mugs time limit per test:1 secondmemory limit per test:256 megabytesinput:standard inputoutput:standard output Sereja showed an interesting game to his friends. The game goes like that. Initially, there is a table with an empty cup
A题意思是,给出两个数列,求一个区间,使第一个数列的区间或和第二个数列的区间或的和最大,输出最大和 很显然,或运算会使得答案越运算越大.所以,直接全部或起来,相加就是答案. = =打cf的时候自动脑补成异或,浪费了好多时间,超出int情况一开始没有考虑,于是加一次重交. #include <cstdio> const int N=1005; long long a[N],b[N]; int n; int main(){ scanf("%d",&n); for(int