ZZUACM暑期集训
LanQiLi
这个作者很懒,什么都没留下…
展开
-
Andy's First Dictionary
Andy, 8, has a dream - he wants to produce his very own dictionary. This is not an easy task for him, as the number of words that he knows is, well, not quite enough. Instead of thinking up all the w...原创 2018-07-24 23:31:07 · 139 阅读 · 0 评论 -
HDU 1004
Contest time again! How excited it is to see balloons floating around. But to tell you a secret, the judges' favorite time is guessing the most popular problem. When the contest is over, they will cou...原创 2018-07-21 22:53:18 · 264 阅读 · 0 评论 -
OpenJ_Bailian 1833
题目描述: 大家知道,给出正整数n,则1到n这n个数可以构成n!种排列,把这些排列按照从小到大的顺序(字典顺序)列出,如n=3时,列出1 2 3,1 3 2,2 1 3,2 3 1,3 1 2,3 2 1六个排列。 任务描述: 给出某个排列,求出这个排列的下k个排列,如果遇到最后一个排列,则下1排列为第1个排列,即排列1 2 3…n。 比如:n = 3,k=2 给出排列2 3 1,则它的下...原创 2018-07-21 22:52:23 · 399 阅读 · 0 评论 -
CodeForces 1007A
You are given an array of integers. Vasya can permute (change order) its integers. He wants to do it so that as many as possible integers will become on a place where a smaller integer used to stand. ...原创 2018-07-21 22:49:20 · 257 阅读 · 0 评论 -
B - 并查集2
Today is Ignatius' birthday. He invites a lot of friends. Now it's dinner time. Ignatius wants to know how many tables he needs at least. You have to notice that not all the friends know each other, a...原创 2018-07-21 00:05:32 · 223 阅读 · 0 评论 -
A - 并查集1
某省调查城镇交通状况,得到现有城镇道路统计表,表中列出了每条道路直接连通的城镇。省政府“畅通工程”的目标是使全省任何两个城镇间都可以实现交通(但不一定有直接的道路相连,只要互相间接通过道路可达即可)。问最少还需要建设多少条道路? Input 测试输入包含若干测试用例。每个测试用例的第1行给出两个正整数,分别是城镇数目N ( < 1000 )和道路数目M;随后的M行对应M条道路,每行给出...原创 2018-07-20 23:54:31 · 163 阅读 · 0 评论 -
小希的迷宫
上次Gardon的迷宫城堡小希玩了很久(见Problem B),现在她也想设计一个迷宫让Gardon来走。但是她设计迷宫的思路不一样,首先她认为所有的通道都应该是双向连通的,就是说如果有一个通道连通了房间A和B,那么既可以通过它从房间A走到房间B,也可以通过它从房间B走到房间A,为了提高难度,小希希望任意两个房间有且仅有一条路径可以相通(除非走了回头路)。小希现在把她的设计图给你,让你帮忙判断她的...原创 2018-07-20 23:52:35 · 105 阅读 · 0 评论 -
Printer Queue
Description The only printer in the computer science students' union is experiencing an extremely heavy workload. Sometimes there are a hundred jobs in the printer queue and you may have to wait for ...原创 2018-07-24 23:33:31 · 154 阅读 · 0 评论 -
Throwing cards away I
Given is an ordered deck of n cards numbered 1 to n with card 1 at the top and card n at the bottom. The following operation is performed as long as there are at least two cards in the deck: Thr...原创 2018-07-24 23:32:09 · 197 阅读 · 0 评论 -
HDU 1263
夏天来了~~好开心啊,呵呵,好多好多水果~~ Joe经营着一个不大的水果店.他认为生存之道就是经营最受顾客欢迎的水果.现在他想要一份水果销售情况的明细表,这样Joe就可以很容易掌握所有水果的销售情况了. Input 第一行正整数N(0<N<=10)表示有N组测试数据. 每组测试数据的第一行是一个整数M(0<M<=100),表示工有M次成功的交易.其后有M行数据,每...原创 2018-07-21 22:54:11 · 388 阅读 · 1 评论