
状压dp
状压dp
ShadyPi
写写博客当笔记
展开
-
[2018.05.05 T1] 互质
暂无链接 互质 【题目描述】 Shy 有 n 个数,问这 n 个数里最多有几个数两两之间互质。 【输入】 第一行一个整数 n。 第二行 n 个数表示数组。 【输出】 输出一个数表示答案。 【输入样例】 5 1 2 3 4 5 【输出样例】 4 【提示】 【数据规模】 对于 30%的数据,1≤n≤10; 对于 100%的数据,1≤...原创 2018-05-07 20:30:10 · 340 阅读 · 0 评论 -
CF1051D Bicolorings
原题链接:http://codeforces.com/contest/1051/problem/D Bicolorings You are given a grid, consisting of 222 rows and nnn columns. Each cell of this grid should be colored either black or white. Two cells a...原创 2018-10-02 10:37:47 · 280 阅读 · 0 评论 -
BZOJ1076[SCOI2008] 奖励关
原题链接:http://www.lydsy.com/JudgeOnline/problem.php?id=1076 奖励关 Description 你正在玩你最喜欢的电子游戏,并且刚刚进入一个奖励关。在这个奖励关里,系统将依次随机抛出k次宝物,每次你都可以选择吃或者不吃(必须在抛出下一个宝物之前做出选择,且现在决定不吃的宝物以后也不能再吃)。宝物一共有n种,系统每次抛出这n种...原创 2018-04-20 19:29:13 · 241 阅读 · 0 评论 -
CF991D Bishwock
原题链接:http://codeforces.com/contest/991/problem/D Bishwock Bishwock is a chess figure that consists of three squares resembling an “L-bar”. This figure can be rotated by 90, 180 and 270 degrees so ...原创 2018-09-11 16:07:32 · 275 阅读 · 0 评论 -
CF1042B Vitamins
原题链接:http://codeforces.com/contest/1042/problem/B Vitamins Berland shop sells nnn kinds of juices. Each juice has its price cic_ici. Each juice includes some set of vitamins in it. There are three t...原创 2018-09-18 08:28:03 · 434 阅读 · 0 评论 -
BZOJ5232[Lydsy2017省队十连测] 好题
原题链接:https://www.lydsy.com/JudgeOnline/problem.php?id=5232 好题 Description 每个人心中对于好题的定义不同,对于小火车来说所谓的好题就是很有趣的题。 有一棵n个节点的树,每个节点都有一种颜色,请找出最小的连通块使得其中的点至少有k种不同的颜色。 Input 第一行两个整数n和k,含义如题所示。 第二行n个正整数,第i个整数表示...原创 2018-10-30 14:50:26 · 782 阅读 · 0 评论