题目链接 题意;给个数组,每次询问一个区间你可以挑任意个数的数字异或和 然后在或上k的最大值 题解:线性基不知道的先看这个,一个线性基可以log的求最大值把对应去区间的线性基求出来然后用线段树维护线性基 #include<bits/stdc++.h> using namespace std; #define LL long long #define maxn 100009 #define ls l,m,rt<<1 #define rs m+1,r,rt<<1|1 int…
题目链接:https://nanti.jisuanke.com/t/20749 参考题解:https://blog.csdn.net/Lee_w_j__/article/details/82664183…
ICPC官网题面假的,要下载PDF,点了提交还找不到结果在哪看(我没找到),用VJ交还直接return 0;也能AC 计蒜客题面 这个好 Time limit 3000 ms OS Linux 题目来源 ACM-ICPC 2017 Asia Xi'an VJ爬到的英文题面什么鬼啊,除了标题,哪里有xor字样啊?\((A[i_1], A[i_2], . . . , A[i_t])\)意思是gcd啊?简直了. 计蒜客的题面 2000ms 是不是计蒜客评测姬快一点,时限少了1s 262144K Con…
ACM-ICPC 2017 Asia Xi'an Solved A B C D E F G H I J K 7/11 O O Ø O O ? O O O for passing during the contest Ø for passing after the contest ! for attempted but failed · for having not attempted yet A - XOR 计蒜客 - A1607 solved by hyd+dyp 题意:长度为\(n\)的数组…
I. Older Brother Your older brother is an amateur mathematician with lots of experience. However, his memory is very bad. He recently got interested in linear algebra over finite fields, but he does not remember exactly which finite fields exist. For…
L. Sticky Situation While on summer camp, you are playing a game of hide-and-seek in the forest. You need to designate a “safe zone”, where, if the players manage to sneak there without being detected,they beat the seeker. It is therefore of utmost i…
luogu P2574 XOR的艺术 (线段树) 算是比较简单的线段树. 当区间修改时.\(1 xor 1 = 0,0 xor 1 = 1\)所以就是区间元素个数减去以前的\(1\)的个数就是现在\(1\)的个数. #include <iostream> #include <cstdio> #define lson now << 1 #define rson now << 1 | 1 const int maxN = 2e5 + 7; struct Node…
题目链接 http://acm.hdu.edu.cn/showproblem.php?pid=5475 Problem Description One day, a useless calculator was being built by Kuros. Let's assume that number X is showed on the screen of calculator. At first, X = 1. This calculator only supports two types…
题目链接: http://codeforces.com/problemset/problem/242/E E. XOR on Segment time limit per test 4 secondsmemory limit per test 256 megabytes 问题描述 You've got an array a, consisting of n integers a1, a2, ..., an. You are allowed to perform two operations on…
#include <cstdio> #include <cstring> ; ; int cnt,Ans,b,x,n; inline int Max(int x,int y) {return x>y?x:y;} ];}Tree[Maxn*Len]; void Insert(int x) { ; bool k; ;i--) { k=x&(<<i); ) Tree[Now].next[k]=++cnt; Now=Tree[Now].next[k]; } } i…