题目解析
SDNU_sqk
这个作者很懒,什么都没留下…
展开
-
POJ 1125 最短路的水题
#include<cstdio> #define MAX 0x3f3f3f3f using namespace std; int main() { int m; //printf("几组数据\n"); //scanf("%d",&n); while(scanf("%d",&m)!=EOF&&m!=0) { int min3=MAX;原创 2017-03-09 21:22:54 · 377 阅读 · 0 评论 -
2017 HDU 6105 多校联合赛 Gameia
Alice and Bob are playing a game called ‘Gameia ? Gameia !’. The game goes like this : 0. There is a tree with all node unpainted initial. 1. Because Bob is the VIP player, so Bob has K chances to原创 2017-08-14 10:51:40 · 424 阅读 · 0 评论 -
畅通工程 最小生成树
问题:某省调查城镇交通状况,得到现有城镇道路统计表,表中列出了每条道路直接连通的城镇。省政府“畅通工程”的目标是使全省任何两个城镇间都可以实现交通(但不一定有直接的道路相连,只要互相间接通过道路可达即可)。问最少还需要建设多少条道路? 输入:测试输入包含若干测试用例。每个测试用例的第1行给出两个正整数,分别是城镇数目N ( < 1000 )和道路数目M;随后的M行对应M条道路,每行给出一对正整数,分原创 2017-03-07 20:11:53 · 383 阅读 · 0 评论 -
2017 HDU 6140 多校联合赛 Hybrid Crystals
Kyber crystals, also called the living crystal or simply the kyber, and known as kaiburr crystals in ancient times, were rare, Force-attuned crystals that grew in nature and were found on scattered pla原创 2017-08-18 16:03:50 · 325 阅读 · 0 评论 -
2017 HDU 多校联合赛 Balala Power!
alented Mr.Tang has nn strings consisting of only lower case characters. He wants to charge them with Balala Power (he could change each character ranged from a to z into each number ranged from 0 to 2原创 2017-07-26 17:23:11 · 572 阅读 · 0 评论 -
2017 HDU 多校联合赛 Regular polygon
On a two-dimensional plane, give you n integer points. Your task is to figure out how many different regular polygon these points can make.InputThe input file consists of several test cases. Each case原创 2017-07-28 15:53:02 · 473 阅读 · 0 评论 -
2017 HDU 多校联合赛 Colorful Tree
There is a tree with nn nodes, each of which has a type of color represented by an integer, where the color of node ii is cici. The path between each two different nodes is unique, of which we define t原创 2017-08-02 09:22:35 · 364 阅读 · 0 评论 -
2017 HDU 6058 多校联合赛 Kanade's sum
Give you an array A[1..n] of length n . Let f(l,r,k) be the k-th largest element of A[l..r]. Specially , f(l,r,k)=0 if r−l+1< k Give you k , you need to calculate ∑(l =1 to n)∑(r = l原创 2017-08-02 16:36:13 · 629 阅读 · 0 评论 -
2017 HDU 6092 多校联合赛 Rikka with Subset
As we know, Rikka is poor at math. Yuta is worrying about this situation, so he gives Rikka some math tasks to practice. There is one of them: Yuta has nn positive A1−An and their sum is m. Then for ea原创 2017-08-10 10:04:02 · 427 阅读 · 0 评论 -
2017 HDU 6103 多校联合赛 Kirinriki
We define the distance of two strings A and B with same length n is dis(A,B)= ∑ (i=0→n−1) abs (Ai−Bn−1−i)The difference between the two characters is defined as the difference in ASCII. You should fin原创 2017-08-14 09:39:25 · 463 阅读 · 0 评论 -
山东省第八届ACM省赛A题
Problem DescriptionSherlock and Watson are playing the following modified version of Nim game: There are n piles of stones denoted as ,,…,, and n is a prime number; Sherlock always plays first, and W原创 2017-07-24 19:03:21 · 589 阅读 · 0 评论 -
山东省第八届ACM省赛C题
Problem DescriptionHmz likes to play fireworks, especially when they are put regularly. Now he puts some fireworks in a line. This time he put a trigger on each firework. With that trigger, each firew原创 2017-07-24 10:37:25 · 564 阅读 · 0 评论 -
Doing Homework again 贪心算法
问题:Ignatius has just come back school from the 30th ACM/ICPC. Now he has a lot of homework to do. Every teacher gives him a deadline of handing in the homework. If Ignatius hands in the homework after原创 2017-03-05 19:46:56 · 565 阅读 · 0 评论 -
百度之星资格赛1003 度度熊与邪恶大魔王
Problem Description度度熊为了拯救可爱的公主,于是与邪恶大魔王战斗起来。邪恶大魔王的麾下有n个怪兽,每个怪兽有a[i]的生命值,以及b[i]的防御力。度度熊一共拥有m种攻击方式,第i种攻击方式,需要消耗k[i]的晶石,造成p[i]点伤害。当然,如果度度熊使用第i个技能打在第j个怪兽上面的话,会使得第j个怪兽的生命值减少p[i]-b[j],当然如果伤害小于防御,那么攻击就不会奏效。如转载 2017-08-05 15:01:09 · 1953 阅读 · 0 评论