- 博客(120)
- 资源 (4)
- 论坛 (1)
- 收藏
- 关注
原创 HDU Today
http://acm.hdu.edu.cn/showproblem.php?pid=2112 Problem Description 经过锦囊相助,海东集团终于度过了危机,从此,HDU的发展就一直顺风顺水,到了2050年,集团已经相当规模了,据说进入了钱江肉丝经济开发区500强。这时候,XHD夫妇也退居了二线,并在风景秀美的诸暨市浬浦镇陶姚村买了个房子,开始安度晚年了。 ...
2018-11-30 23:23:19
72
原创 一个人的旅行
http://acm.hdu.edu.cn/showproblem.php?pid=2066 Problem Description 虽然草儿是个路痴(就是在杭电待了一年多,居然还会在校园里迷路的人,汗~),但是草儿仍然很喜欢旅行,因为在旅途中 会遇见很多人(白马王子,^0^),很多事,还能丰富自己的阅历,还可以看美丽的风景……草儿想去很多地方,她想要去东京铁塔看夜景,去威尼斯看...
2018-11-30 16:56:24
79
原创 Wine trading in Gergovia
http://acm.hdu.edu.cn/showproblem.php?pid=1489 Problem Description As you may know from the comic "Asterix and the Chieftain's Shield", Gergovia consists of one street, and every inhabitant o...
2018-11-30 14:23:25
128
原创 Dream City
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3211JAVAMAN is visiting Dream City and he sees a yard of gold coin trees. There are ntrees in the yard. Let's call them tree 1, tree 2 .....
2018-11-30 10:19:57
104
原创 The Staircases
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=1163One curious child has a set of N little bricks. From these bricks he builds different staircases. Staircase consists of steps of diff...
2018-11-30 09:03:15
170
原创 Bottles
https://codeforces.com/problemset/problem/730/JNick has n bottles of soda left after his birthday. Each bottle is described by two values: remaining amount of soda ai and bottle volume bi (ai ≤ bi)....
2018-11-29 20:09:11
148
原创 Vasya and Book
https://codeforces.com/contest/1082/problem/A题解:一共四种情况1、往左走没有到n就达到目的地(包括目的地为n)2、往右走没有到1就达到目的地(包括目的地为1)3、往左走到n,回头再达到目的地4、往右走到1,回头再达到目的地/**@Author: STZG*@Language: C++*/#include <...
2018-11-29 20:04:56
153
原创 The Values You Can Make
https://codeforces.com/problemset/problem/687/CPari wants to buy an expensive chocolate from Arya. She has n coins, the value of the i-th coin is ci. The price of the chocolate is k, so Pari will ta...
2018-11-28 20:13:38
157
原创 Fire
https://codeforces.com/problemset/problem/864/EPolycarp is in really serious trouble — his house is on fire! It's time to save the most valuable items. Polycarp estimated that it would take ti secon...
2018-11-28 15:05:53
92
原创 Round Subset
https://codeforces.com/problemset/problem/837/DLet's call the roundness of the number the number of zeros to which it ends.You have an array of n numbers. You need to choose a subset of exactly k ...
2018-11-28 11:37:00
130
原创 Buns
https://codeforces.com/problemset/problem/106/CLavrenty, a baker, is going to make several buns with stuffings and sell them.Lavrenty has n grams of dough as well as m different stuffing types. Th...
2018-11-25 16:18:03
391
原创 Dima and Salad
https://codeforces.com/problemset/problem/366/CDima, Inna and Seryozha have gathered in a room. That's right, someone's got to go. To cheer Seryozha up and inspire him to have a walk, Inna decided t...
2018-11-25 15:24:48
187
原创 奶牛问题
Description好好过个年吧,遇雪灾了, 好好火炬传递,遇藏独了 , 发展农村医疗吧,发手足口病了 买点股票吧,大小非减持了 做火车吧,还出轨了 在家待着吧,还地震了 天将降大运于斯国也,必先下其大雪,撞其火车,抢其火炬,震其国土,涨其物价,跌其股市,空房其民。 四川大地震,牵动了中华民族的很多颗心。小明决定用实际行动来支援四川,所以他决定养奶牛给前线运牛奶。 最初他只有一头母牛,它每年...
2018-11-25 00:01:38
527
原创 我开始方了
Description分别给你4个长方形的长和宽,问这4个长方形中,是否能选出3个组成一个大的长方形。Input第一行输入一个整数T(T<=100),表示一共有T组数据每组数据包含一行,有8个整数,分别为h1、w1、h2、w2、h3、w3、h4、w4。这些整数的范围在[1,1000]Output如果可以组成一个大长方形就输出“Yes”(不包括引号),否则输出“No”(...
2018-11-25 00:01:22
205
原创 最大化
Description 给你n个整数,请重新排列这些整数,使得式子的值最大,其中表示第i个整数。请输出S的最大值。 Input第一行一个整数n(2 <= n <= 100000),表示数字的个数;第二行为n个整数 (1 <= ai <= 1000000000)Output 输出一个整数,表示S的最大值。 Sample Input...
2018-11-25 00:01:16
126
原创 调整队列
Description 这天小g遇到了一个队列,小g觉得队列乱糟糟的不好看。于是小g希望将队列调整成为一个等差数列(差可为0)。但是小g对每个数都最多调整一次,每次可以对这个数加一、减一。请你帮助小g解决这个问题,如果能调整出等差队列,输出需要调整的数的最小数量,否则输出-1。 Input第一行一个整数n(2 <= n <= 100000),表示数列中数的个数;第二...
2018-11-25 00:01:07
202
原创 采摘苹果
Description一天小g遇到了一棵神奇的苹果树,树上有n个苹果并将这n个苹果按1-n标号,每个苹果都会向下落,单位时间将完成一次掉落。现在规定只有当苹果掉到1时才能采摘,除了1位置,其他位置的苹果每一次将落到对应的pi上,直至掉落至1位置。现在规定同一时间,同一位置有偶数个苹果时,它们消失不见,如果是奇数则剩下一个。保证最后所有的苹果都会落到1位置上,问最后小g将收获多少个苹果。 ...
2018-11-24 20:40:29
162
原创 四色图
Description Perfectxx给LZH出了一道题,要LZH构造出一个尽可能大的四色图。所谓的四色图指的是由n个点m条边组成的无向图。其中,每个点要么是红色,要么是蓝色,每条边要么是黑色,要么是白色。黑边能连接两个红点,或是一个红点与一个蓝点。而白边只能连接红点与蓝点。LZH构造出了一个图,但是委托给Murphyc,让他去打印的时候,Murphyc用了黑白打印机。现在分不清楚...
2018-11-24 20:39:10
2495
原创 平方排列
Description 给你一个n,问能否将1到n这n个整数进行排列,使得这个排列中任意两个相邻的数字和都是平方数。如果能,输出这个排列(如果存在多个,输出字典序最小的),否则输出-1。 Input 输入一个整数n (1 <= n <= 15) Output 如果存在这样的排列(如果存在多个,输出字典序最小的),输出n个以空格隔开的整数表示这个排列,否则输出...
2018-11-24 20:35:43
156
原创 粗题⼈不考你没学过的算法
Description粗题⼈症重承诺此题不考你没学过的算法给你⼀个区间[L,R]需要选择N个数,这N个数都在这个区间范围内那么我们知道⼀共有[R-L+1]^N种选法假如我们想要这N个数的最⼤公约数恰好是K请问⼀共有多少种选法,输出答案对1e9+7取模Input 多组测试数据 对于每组数据,输⼊⼀⾏包含4个整数N,K,L,R(1<=N,K,L<=10^9,...
2018-11-24 20:31:02
193
原创 panda和卡片
Descriptionpanda喜欢2的幂次,于是他在⾃⼰的书包⾥塞了很多写着2的幂次的卡⽚ 可能多张卡⽚会写着同⼀个数字 panda喜欢那些能⽤⼀张或者多张卡⽚的和所表⽰的数字 ⽐如书包⾥有四张卡⽚2,4,4,64 那么panda就会喜欢10,因为10=2+4+4 也喜欢0 但是不会喜欢12,因为12=4+4+2+2,可怜的panda只有⼀张2 现在panda想知道他⼀共会喜欢多少个数。...
2018-11-24 20:29:37
188
原创 LLL和小猫
DescriptionLLL有⼀群猫友,每只⼩猫都站在坐标轴上的某个位置,这群猫友很听LLL的话,每当LLL做个⼿势,每只⼩猫都会移动恰好X个单位的距离,要么向左,要么向右现在告诉你每只⼩猫在移动前的位置,求移动之后最左边的猫与最右边的猫的最⼩距离Input 多组测试数据 对于每组数据,第⼀⾏输⼊⼀个整数n (1<=n<=50 ),表⽰猫的数量 第⼆⾏输⼊n个数pi...
2018-11-24 20:27:42
136
原创 交税
Description阿强愉快的拿到了自己工资,可是抠门的他发现自己还要没有交税。X国采用一种奇怪的税收方式。对于工资num,需要收的税是p,p为num的最大的除数并且p不等于num。(ps:6的最大除数是3,25的最大除数是5,2的最大除数是1)为了减少人们要交的税,X国又规定可以把钱分开算税,分开的个数不限,即n1 + n2 + ... + nk = n,要交的税就是每个部...
2018-11-24 20:24:26
503
原创 01串
Description现在我们有一个由01组成的字符串。我们需要在上面做一些操作。每次我们都选一个“01”子串,把他替换成110。如果找不到“01”子串,那么操作结束。请输出总共进行了多少次操作,结果请mod 1e9+7。 Ps:“01”子串必须是相邻的0和1,字符串中只包含0和1。 Input首先一个T,代表接下来有T行。接下来的T行,每行一个字符串str(...
2018-11-24 20:20:26
182
原创 你面对以希望为名的绝望微笑
Description尽管Murphyc赶在学级裁判开始前进入了未来机关的控制室,但学级裁判已经被设置为不可中断.虽然之前利用魔法修改识别码时已经尽量减少魔力消耗,但此刻魔力仍是所剩无几。Murphyc无力地坐到了地上,眼睁睁的看着Chiaki被处以“学级裁判”.Chiaki在弥留之际: 私の方こそ・・・ありがとう ...
2018-11-24 20:15:25
1148
原创 偶然间最糟糕的再会
Description一天Murphyc从睡梦中醒来,发现自己居然穿越到了弹丸论破的世界。作为原作全成就通关的超高校级Gamer,Murphyc很清楚接下来会发生什么。为了中止Chiaki即将面临的“学级裁判”,Murphyc溜进了未来机关内部,但是只有持有特定编号的识别卡才能进入机关控制室。好在,Murphyc其实还有另一重身份----法师学徒!虽然Murphyc手中只有门口警卫的识别卡...
2018-11-24 20:13:27
225
原创 A Mini Locomotive
http://poj.org/problem?id=1976A train has a locomotive that pulls the train with its many passenger coaches. If the locomotive breaks down, there is no way to pull the train. Therefore, the office o...
2018-11-23 22:15:46
104
原创 Dominoes
http://poj.org/problem?id=1717A domino is a flat, thumbsized tile, the face of which is divided into two squares, each left blank or bearing from one to six dots. There is a row of dominoes laid out...
2018-11-22 22:08:35
189
原创 Cow Exhibition
http://poj.org/problem?id=2184"Fat and docile, big and dumb, they look so stupid, they aren't much fun..." - Cows with Guns by Dana Lyons The cows want to prove to the public that they are both s...
2018-11-22 19:31:10
202
原创 Proud Merchants
http://acm.hdu.edu.cn/showproblem.php?pid=3466Recently, iSea went to an ancient country. For such a long time, it was the most wealthy and powerful kingdom in the world. As a result, the people in t...
2018-11-21 19:43:50
121
原创 Bone Collector II
http://acm.hdu.edu.cn/showproblem.php?pid=2639The title of this problem is familiar,isn't it?yeah,if you had took part in the "Rookie Cup" competition,you must have seem this title.If you haven't se...
2018-11-21 18:24:19
132
原创 Bone Collector
http://acm.hdu.edu.cn/showproblem.php?pid=2602Many years ago , in Teddy’s hometown there was a man who was called “Bone Collector”. This man like to collect varies of bones , such as dog’s , cow’s ,...
2018-11-20 20:25:27
74
原创 Big Event in HDU
http://acm.hdu.edu.cn/showproblem.php?pid=1171Nowadays, we all know that Computer College is the biggest department in HDU. But, maybe you don't know that Computer College had ever been split into C...
2018-11-20 20:08:30
77
原创 最大报销额
http://acm.hdu.edu.cn/showproblem.php?pid=1864 现有一笔经费可以报销一定额度的发票。允许报销的发票类型包括买图书(A类)、文具(B类)、差旅(C类),要求每张发票的总额不得超过1000元,每张发票上,单项物品的价值不得超过600元。现请你编写程序,在给出的一堆发票中找出可以报销的、不超过给定额度的最大报销额。 Input测试输入包含若干...
2018-11-20 19:43:58
97
原创 Creating the Contest
https://codeforces.com/contest/1029/problem/B/**@Author: STZG*@Language: C++*/#include <bits/stdc++.h>#include<iostream>#include<algorithm>#include<cstdlib>#includ...
2018-11-19 19:10:30
100
原创 Many Equal Substrings
https://codeforces.com/contest/1029/problem/A/**@Author: STZG*@Language: C++*/#include <bits/stdc++.h>#include<iostream>#include<algorithm>#include<cstdlib>#includ...
2018-11-19 19:09:29
87
原创 Binary Numbers AND Sum
https://codeforces.com/contest/1066/problem/Etime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given two huge binary intege...
2018-11-19 16:23:00
190
原创 Boxes Packing
https://codeforces.com/contest/1066/problem/Dtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputMaksim has n objects and mm boxes, e...
2018-11-19 15:00:21
141
原创 Books Queries
https://codeforces.com/contest/1066/problem/Ctime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou have got a shelf and want to pu...
2018-11-19 14:29:19
119
原创 Heaters
https://codeforces.com/contest/1066/problem/Btime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputVova's house is an array consisting ...
2018-11-18 20:39:06
159
赫夫曼编码/译码器_《数据结构与算法》课程设计_JAVA版
2019-12-16
C++课程设计-便利店管理系统.rar
2019-05-14
STZG的留言板
发表于 2020-01-02 最后回复 2020-07-02
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人 TA的粉丝