
思维
bfcx
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
【CodeForces - 246D】Colorful Graph
You've got an undirected graph, consisting of n vertices and m edges. We will consider the graph's vertices numbered with integers from 1 to n. Each vertex of the graph has a color. The color of the i...原创 2018-11-08 16:22:28 · 304 阅读 · 0 评论 -
【Codeforces-505B】Mr. Kitayuta's Colorful Graph(二维并查集)
Mr. Kitayuta's Colorful Graphtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputMr. Kitayuta has just bought an undirected graph con...原创 2019-05-22 17:23:14 · 313 阅读 · 0 评论 -
【51nod-1065】最小正子段和(思维)
N个整数组成的序列a[1],a[2],a[3],…,a[n],从中选出一个子序列(a[i],a[i+1],…a[j]),使这个子序列的和>0,并且这个和是所有和>0的子序列中最小的。例如:4,-1,5,-2,-1,2,6,-2。-1,5,-2,-1,序列和为1,是最小的。收起输入第1行:整数序列的长度N(2 <= N <= 50000)第2 - N+1...原创 2019-05-24 21:47:25 · 509 阅读 · 0 评论 -
【HDU - 6301】Distinct Values(思维+优先队列)
Chiaki has an array ofnnpositive integers. You are told some facts about the array: for every two elementsaiaiandajajin the subarrayal..ral..r(l≤i<j≤rl≤i<j≤r),ai≠ajai≠ajholds.Chiaki ...原创 2019-05-08 19:55:41 · 268 阅读 · 0 评论 -
【HDU - 6300】Triangle Partition (思维+不相交的三角形)
Chiaki has3n3npointsp1,p2,…,p3np1,p2,…,p3n. It is guaranteed that no three points are collinear.Chiaki would like to constructnndisjoint triangles where each vertex comes from the3n3npoints....原创 2019-04-23 22:42:54 · 320 阅读 · 0 评论 -
【哈尔滨理工大学软件与微电子学院第八届程序设计竞赛同步赛(高年级)】小乐乐的组合数+(思维)
链接:https://ac.nowcoder.com/acm/contest/301/A来源:牛客网 题目描述小乐乐得知一周有7天之后就对7产生了兴趣。小乐乐得到了两堆数字数字时连续的。第一堆包含[1,n]n个数字,第二堆包含[1,m]m个数字。小乐乐想要从两堆中各挑选出一个整数x,y,使得x,y的和为7的倍数。请问小乐乐有多少种组合的方式。输入描述:输入整数n...原创 2018-12-02 10:01:04 · 206 阅读 · 0 评论 -
【2018年广东工业大学文远知行杯新生程序设计竞赛】灰暗而空虚的景色β
http://acm.hdu.edu.cn/contests/contest_showproblem.php?pid=1009&cid=832Problem DescriptionIn the world line 1.048596%“雪啊。”“雪是红色的。”像坏掉的复读机一样,梓川咲太只能把闪烁的思绪断断续续的说出来。“这,是梦吧。”从口中滑出的却是这样的话。回过神的...原创 2018-12-02 09:44:28 · 449 阅读 · 0 评论 -
【CodeForces - 76D】Plus and xor(位运算-异或)
Bitwise exclusive OR (or bitwise addition modulo two) is a binary operation which is equivalent to applying logical exclusive OR to every pair of bits located on the same positions in binary notation ...原创 2018-11-24 13:23:55 · 494 阅读 · 0 评论 -
【CodeForces - 266C】Below the Diagonal(模拟)
You are given a square matrix consisting of n rows and n columns. We assume that the rows are numbered from 1 to n from top to bottom and the columns are numbered from 1to n from left to right. Some c...原创 2018-11-18 11:46:39 · 374 阅读 · 0 评论 -
【CodeForces - 288B】Polo the Penguin and Houses (组合数学+Purfer序列)
Little penguin Polo loves his home village. The village has n houses, indexed by integers from 1 to n. Each house has a plaque containing an integer, the i-th house has a plaque containing integer pi ...原创 2018-11-24 10:11:30 · 446 阅读 · 0 评论 -
【CodeForces - 288C】Polo the Penguin and XOR operation (思维、异或运算)
Little penguin Polo likes permutations. But most of all he likes permutations of integers from 0 to n, inclusive.For permutation p = p0, p1, ..., pn, Polo has defined its beauty — number .Expressi...原创 2018-11-24 08:59:17 · 345 阅读 · 0 评论