
CF
文章平均质量分 87
looooooogn
QQ : 2173048590
展开
-
Codeforces Round #194 (Div. 2) B. Eight Point Sets 模拟
Gerald is very particular to eight point sets. He thinks that any decent eight point set must consist of all pairwise intersections of three distinct integer vertical straight lines and three distinct...原创 2018-08-30 09:42:50 · 246 阅读 · 0 评论 -
CF1017D The Wu 暴力
题意翻译给长度=N的w数组w[1...N],定义2个长度=N的01串s,t之间构成的答案 = sigma{w[i]}, i=1..N且s[i]==t[i]。给定长度=N的01串的multiset S,每次给01串t和K值,询问S中和t串构成答案<=K的s串数量。题目描述Childan is making up a legendary story and trying to s...原创 2018-10-20 10:19:37 · 228 阅读 · 0 评论 -
CF445B DZY Loves Chemistry
题意翻译DZY热爱化学.他有n种物质,其中m对会反应.他把它们一种一种倒到烧杯里.有一个危险值,一开始等于1.如果一种物质倒到烧杯里之后至少有一种物质能和它反应,则危险值乘以二;否则危险值不变.求所有物质倒到烧杯里之后最大的危险值.By @Fuko_Ibuki题目描述DZY loves chemistry, and he enjoys mixing chemicals.DZY ...原创 2018-10-28 17:15:40 · 318 阅读 · 0 评论 -
CF1C Ancient Berland Circus 计算几何
题意翻译现在所有的马戏团在 Berland 都有一个直径13米的圆形竞技场, 但在过去的事情是不同的。在古代 Berland 竞技场的马戏团被塑造成一个规则 (等角) 多边形, 角色的大小和角度可能因马戏团而异。竞技场的每个角落都有一根特别的柱子, 柱子之间的绳子标记着竞技场的边缘。最近, 来自 Berland 的科学家发现了古代马戏团竞技场的遗迹。他们发现只有三根柱子, 其他的被毁坏...原创 2018-10-28 19:36:31 · 248 阅读 · 0 评论 -
CF444A DZY Loves Physics
题意翻译题目大意:给定一个无向图,定义一个图的联通导出子图的密度为其点权之和除以边权之和。(注:边权之和为零的图密度为零)求该图的联通导出子图的最大密度。一个图的导出子图是指,选取一个顶点集,以两端点均在该顶点集中的边的全体为边集的子图。输入格式:第一行两个整数n (1<=n<=500) ,m(0<=m<=n(n-1)/2),分别表示图的节点数和边数。第二行n个整数...原创 2018-10-28 20:32:04 · 288 阅读 · 0 评论 -
CF1041E Tree Reconstruction 构造题
题意翻译题目大意:有一棵树,现在给你每条树边被去掉时,形成的两个联通块中点的最大的编号分别是多少,问满足条件的树存不存在输入格式:第一行一个整数nnn往下n−1n-1n−1行,每行两个整数,表示去掉这条边后两个联通块中点的最大的编号是多少输出格式:如果不存在满足条件的树,输出"NO"否则输出"YES",下面n−1n-1n−1行每行描述一条树边(两端点的编号)题目...原创 2018-10-21 16:32:52 · 266 阅读 · 0 评论 -
CF1042D Petya and Array 树状数组
题目描述Petya has an arraya aa consisting ofn nn integers. He has learned partial sums recently, and now he can calculate the sum of elements on any segment of the array really fast. The segment is a...原创 2018-09-21 09:56:20 · 509 阅读 · 0 评论 -
CF696A Lorenzo Von Matterhorn 二叉树
Barney lives in NYC. NYC has infinite number of intersections numbered with positive integers starting from 1. There exists a bidirectional road between intersections i and 2i and another road between...原创 2018-11-03 18:29:08 · 292 阅读 · 0 评论 -
CF696B Puzzles 树形dp+期望
D. Puzzlestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputBarney lives in country USC (United States of Charzeh). USC has n citie...原创 2018-11-03 18:53:11 · 306 阅读 · 0 评论 -
CF1034A Enlarge GCD
题意翻译给你n个数,去掉尽量少的数使得剩下数的gcd比原来的大。无解输出-1Translated by @xzz_233题目描述Mr. F has n n n positive integers, a1,a2,…,an a_1, a_2, \ldots, a_n a1,a2,…,an .He thinks the greatest common divisor of th...原创 2018-11-09 11:00:35 · 248 阅读 · 0 评论 -
CF679A Bear and Prime 100 交互题
This is an interactive problem. In the output section below you will see the information about flushing the output.Bear Limak thinks of some hidden number — an integer from interval [2, 100]. Your t...原创 2018-11-09 18:41:07 · 935 阅读 · 0 评论 -
CF1017C The Phone Number 贪心
Mrs. Smith is trying to contact her husband, John Smith, but she forgot the secret phone number!The only thing Mrs. Smith remembered was that any permutation of ncan be a secret phone number. Only...原创 2018-10-19 19:43:18 · 165 阅读 · 0 评论 -
Tanya and Password CodeForces - 508D Hash + 欧拉路径
While dad was at work, a little girl Tanya decided to play with dad’s password to his secret database. Dad’s password is a string consisting of n + 2 characters. She has written all the possible n thr...原创 2018-10-15 09:30:15 · 308 阅读 · 0 评论 -
Codeforces Round #513 by Barcelona Bootcamp (rated, Div. 1 + Div. 2) C
C. Maximum Subrectangletime limit per test2 secondsmemory limit per test512 megabytesinputstandard inputoutputstandard outputYou are given two arrays aand b of positive integers, with length...原创 2018-10-04 20:07:09 · 291 阅读 · 0 评论 -
Codeforces Round #513 by Barcelona Bootcamp (rated, Div. 1 + Div. 2) D
D. Social Circlestime limit per test2 secondsmemory limit per test512 megabytesinputstandard inputoutputstandard outputYou invited nguests to dinner! You plan to arrange one or more circles ...原创 2018-10-04 20:33:26 · 343 阅读 · 0 评论 -
B. Vasya and Isolated Vertices 模拟
Vasya has got an undirected graph consisting of n vertices and m edges. This graph doesn’t contain any self-loops or multiple edges. Self-loop is an edge connecting a vertex to itself. Multiple edges ...原创 2018-10-12 10:49:12 · 540 阅读 · 0 评论 -
C. Make It Equal 差分
There is a toy building consisting of n towers. Each tower consists of several cubes standing on each other. The i-th tower consists of hi cubes, so it has height hi.Let’s define operation slice on ...原创 2018-10-12 15:38:15 · 425 阅读 · 0 评论 -
Codeforces Round #514 (Div. 2) C. Sequence Transformation
Let’s call the following process a transformation of a sequence of length n.If the sequence is empty, the process ends. Otherwise, append the greatest common divisor (GCD) of all the elements of the...原创 2018-10-06 09:13:52 · 430 阅读 · 2 评论 -
Divide by Zero 2017 and Codeforces Round #399 (Div. 1 + Div. 2, combined)
B. Code For 1time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputJon fought bravely to rescue the wildlings who were attacked by the white-wa...原创 2018-10-06 10:59:42 · 418 阅读 · 0 评论 -
E. Game of Stones SG函数
Sam has been teaching Jon the Game of Stones to sharpen his mind and help him devise a strategy to fight the white walkers. The rules of this game are quite simple:The game starts with n piles of sto...原创 2018-10-07 09:35:58 · 350 阅读 · 0 评论 -
D. Jon and Orbs 概率dp
Jon Snow is on the lookout for some orbs required to defeat the white walkers. There are k different types of orbs and he needs at least one of each. One orb spawns daily at the base of a Weirwood tre...原创 2018-10-07 10:15:35 · 187 阅读 · 0 评论 -
C. Tavas and Karafs 二分
Karafs is some kind of vegetable in shape of an 1 × h rectangle. Tavaspolis people love Karafs and they use Karafs in almost any kind of food. Tavas, himself, is crazy about Karafs.Each Karafs has a ...原创 2018-10-07 18:41:53 · 221 阅读 · 0 评论 -
Codeforces Round #288 (Div. 2) C
Anya loves to watch horror movies. In the best traditions of horror, she will be visited by m ghosts tonight. Anya has lots of candles prepared for the visits, each candle can produce light for exactl...原创 2018-10-14 14:53:33 · 228 阅读 · 0 评论 -
CF258B Little Elephant and Elections 数位dp
There have recently been elections in the zoo. Overall there were 7 main political parties: one of them is the Little Elephant Political Party, 6 other parties have less catchy names.Political parti...原创 2018-11-04 21:29:27 · 241 阅读 · 0 评论