随笔分类 - 位运算及状态压缩
摘要:题目:戳这里 题意:两个数n,k,满足给的n个数小于2的k次方。每个数可以进行一次操作,即把a[i]换成a[i]^(1<<k-1);求最多的连续区间数使得 区间[L,R] (1<=L<=R<=n),满足: a[L] ^ a[L+1] ^ … ^ a[R-1] ^ a[R] != 0 解题思路: 首先
阅读全文
摘要:题目描述 某人刚学习了数位DP,他在某天忽然思考如下问题: 给定n,问有多少数对<x, y>满足: x, y∈[1, n], x < y x, y中出现的[0, 9]的数码种类相同 某人刚学习了数位DP,他在某天忽然思考如下问题: 给定n,问有多少数对<x, y>满足: x, y∈[1, n], x
阅读全文
摘要:C. Industrial Nim time limit per test 2 seconds time limit per test memory limit per test 64 megabytes memory limit per test input standard input inpu
阅读全文
摘要:太难了,学不会。看了两天都会背了,但是感觉题目稍微变下就不会了。dp还是摸不到路子。 附ac代码: 1 #include<iostream> 2 #include<cstdio> 3 #include<cstring> 4 #include<algorithm> 5 #include<vector>
阅读全文
摘要:C. Looking for Order time limit per test 4 seconds memory limit per test 512 megabytes input standard input output standard output Girl Lena likes it
阅读全文
摘要:Ms.Fang loves painting very much. She paints GFW(Great Funny Wall) every day. Every day before painting, she produces a wonderful color of pigments by
阅读全文
摘要:It’s harvest season now! Farmer John plants a lot of corn. There are many birds living around his corn field. These birds keep stealing his corn all t
阅读全文
摘要:A. Short Program time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output A. Short Program time l
阅读全文
摘要:A. The Artful Expedient time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output A. The Artful Exp
阅读全文
摘要:C. Qualification Rounds time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Snark and Philip
阅读全文
摘要:For an upcoming programming contest, Edward, the headmaster of Marjar University, is forming a two-man team from N students of his university. Edward
阅读全文

浙公网安备 33010602011771号