Codeforces 934 A.Compatible Pair】的更多相关文章

http://codeforces.com/contest/934 A. A Compatible Pair   time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Nian is a monster which lives deep in the oceans. Once a year, it shows up on the la…
A. A Compatible Pair time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Nian is a monster which lives deep in the oceans. Once a year, it shows up on the land, devouring livestock and even peo…
A. A Compatible Pair time limit per test1 second memory limit per test256 megabytes Problem Description Nian is a monster which lives deep in the oceans. Once a year, it shows up on the land, devouring livestock and even people. In order to keep the…
[codeforces 317]A. Perfect Pair 试题描述 Let us call a pair of integer numbers m-perfect, if at least one number in the pair is greater than or equal to m. Thus, the pairs (3, 3) and (0, 2) are 2-perfect while the pair (-1, 1) is not. Two integers x, y a…
A Compatible Pair time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Nian is a monster which lives deep in the oceans. Once a year, it shows up on the land, devouring livestock and even people…
题目链接:http://codeforces.com/problemset/problem/93/B B. End of Exams time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Students love to celebrate their holidays. Especially if the holiday is th…
LINK 题目大意 给你一个数组,问你数组中的每个数是否可以在数组里面找到一个数和他and起来是0,如果可以就输出这个数,否则就输出-1 思路 首先很显然的是可以考虑找到每个数每一位都取反的数的子集 如果子集中存在一个数就满足,否则就不满足 然后就做一个子集前缀和 for (int i = 0; i < n; i++) { for (int s = 0; s <= up; s++) { if ((s >> i) & 1) dp[s] trans from dp[s ^ (1…
Problem description Nian is a monster which lives deep in the oceans. Once a year, it shows up on the land, devouring livestock and even people. In order to keep the monster away, people fill their villages with red colour, light, and cracking noise,…
A B C 给你一个长度为N的01串 你可以翻转一次任意[L,R]的区间 问你最长的不递减序列为多少长 处理出1的前缀和 和2的后缀和 然后N^2 DP 处理出 [L,R]区间的最长不递增序列 #include <bits/stdc++.h> #define PI acos(-1.0) #define mem(a,b) memset((a),b,sizeof(a)) #define TS printf("!!!\n") #define pb push_back #defin…
主题链接~~> 做题情绪:好题,做拉的比赛的时候想了非常久,想到枚举变幻某一位的 0 为 1 .可是每一个数都这样枚举岂不超时的节奏,当时没想到事实上从大到小枚举一次就 ok 了. 解题思路: 本题要求两个数  a & b = 0 , 假设 a  =  10010 , b 至少(指在 a 中的为 1 的位必须为 0 )是 01101 ,还能够是 00101 ,00001 .00000.就相当于你去买东西一样,先提出你的要求(必须满足).至于其它方面都无所谓. 这样我们能够枚举 b 中的 1…