题目连接: http://codeforces.com/gym/100269/attachments Description Little Vasya is playing a new game named “Dwarf Tower”. In this game there are n different items,which you can put on your dwarf character. Items are numbered from 1 to n. Vasya wants to…
Dwarf Tower 题目连接: http://codeforces.com/gym/100269/attachments Description Little Vasya is playing a new game named "Dwarf Tower". In this game there are n different items, which you can put on your dwarf character. Items are numbered from 1 to…
原题链接:http://codeforces.com/gym/100338/attachments/download/2136/20062007-winter-petrozavodsk-camp-andrew-stankevich-contest-22-asc-22-en.pdf 题意 给你一个无向图,要从1走到n,问你哪些边去掉之后就没法走原本的最短路了. 题解 跑两发最短路,顺着跑一发,倒着跑一发,对于边(u,v),如果w(u,v)+d[u]+rd[v]或者w(u,v)+d[v]+rd[u]…
Problem A. Arrangement of Contest 题目连接: http://codeforces.com/gym/100269/attachments Description Little Dmitry and little Petr want to arrange a contest. Their little friends submitted several task proposals and now Dmitry and Petr want to select som…
http://codeforces.com/gym/100269/attachments 首先建图,然后图中每条边的权值是会变化的,是由dis[x] + dis[y]  --->   dis[make],然后就相当于新增加一个原点0,求0到1的最短距离 如果用了2更新4失败,但是2本来不是最优的,就是可以用7和8使得更优,那这样会不会漏掉最优解?答案是不会的,因为使用到7和8能更新2得时候,就会把2重新丢尽队列 #include <bits/stdc++.h> #define IOS i…
题目链接:http://codeforces.com/gym/100269/attachments 题意: 有长度为n个格子,你有两种操作,1是放一个长度为1的东西上去,2是放一个长度为2的东西上去 每个东西在每秒钟都会产生1的能力. 然后问你怎么放才能使得最后能力最大,输出出来 解法: 贪心,最后肯定1越多越好 所以我们放1的时候,注意一下,如果放不下的话,就把其中一个2扔掉,然后放1就好了 //CF gym 100269E #include <bits/stdc++.h> using na…
Kids in a Friendly Class 题目连接: http://codeforces.com/gym/100269/attachments Description Kevin resembles his class in primary school. There were girls and boys in his class. Some of them were friends, some were not. But if one person considered anothe…
Garage 题目连接: http://codeforces.com/gym/100269/attachments Description Wow! What a lucky day! Your company has just won a social contract for building a garage complex. Almost all formalities are done: contract payment is already transferred to your a…
Flight Boarding Optimization 题目连接: http://codeforces.com/gym/100269/attachments Description Peter is an executive boarding manager in Byteland airport. His job is to optimize the boarding process. The planes in Byteland have s rows, numbered from 1 t…
Ballot Analyzing Device 题目连接: http://codeforces.com/gym/100269/attachments Description Election committee of Flatland is preparing for presidential elections. To minimize human factor in ballot counting they decided to develop an automated Ballot Ana…