题意:给定0-n+1个点,和m条边,让你找到一条从0到n+1的最短路,输出与0相连的结点... 析:很明显么,是Dijkstra算法,不过特殊的是要输出与0相连的边,所以我们倒着搜,也是从n+1找到0, 那么不就能找到与0相连的边么,注意判断相等值的时候.当时写错了好多次,就是没有考虑好边界. 代码如下: #include <iostream> #include <cstdio> #include <cmath> #include <algorithm> #…
题意:鱼人是炉石里的一支强大种族,在探险者协会里,圣骑士有了一张新牌,叫亡者归来,效果是召唤本轮游戏中7个已死鱼人.如果死掉的不足7个,那么召唤的数量就会不足7. 鱼人有很多,下面的4个是: 寒光智者:3费,2攻,2血,战吼:双方玩家各抽2张牌. 鱼人领军:3费,3攻,3血,其他鱼人获得+2/+1. 蓝腮战士:2费,2攻,3血,冲锋. 老瞎眼:4费,2攻,3血,冲锋.战场上每有1个其他鱼人就会使其获得+1攻击. 下面给一些说明: 法力:召唤随从的消耗.技能效果召唤的随从不消耗额外法力,只会消耗卡…
Memory Leak Time Limit: 2000MS Memory limit: 131072K 题目描述 Memory Leak is a well-known kind of bug in C/C++. When a string is longer than expected, it will visit the memory of next array which will cause the issue and leak some information. You can se…
Reversed Words Time Limit: 2000MS Memory limit: 131072K 题目描述 Some aliens are learning English. They have a very strange way in writing that they revered every word in the sentence but keep all the words in common order. For example when they want to…
Triple Nim Time Limit: 2000MS Memory limit: 65536K 题目描述 Alice and Bob are always playing all kinds of Nim games and Alice always goes first. Here is the rule of Nim game: There are some distinct heaps of stones. On each turn, two players should remov…
The Binding of Isaac Time Limit: 2000MS Memory limit: 65536K 题目描述 Ok, now I will introduce this game to you... Isaac is trapped in a maze which has many common rooms- Like this-There are 9 common rooms on the map. And there is only one super-secret r…
Fibonacci Time Limit: 2000MS Memory limit: 131072K 题目描述 Fibonacci numbers are well-known as follow: Now given an integer N, please find out whether N can be represented as the sum of several Fibonacci numbers in such a way that the sum does not inclu…
Julyed Time Limit: 2000MS Memory limit: 65536K 题目描述 Julyed is preparing for her CET-6. She has N words to remember, but there is only M days left. If she can't remember all these words, she won't pass CET-6. If she can't pass CET-6, she will be unhap…
Description A Swiss-system tournament is a tournament which uses a non-elimination format. The first tournament of this type was a chess tournament in Zurich in 1895, hence the name "Swiss system". The tournament will be held based on following…
ID Title Hint A Julyed 无 B Fibonacci 打表 C Proxy 最短路径 D Swiss-system tournament 归并排序 E The Binding of Isaac 图 F Feed the monkey dp G Triple Nim 找规律 H Memory Leak 模拟 I Rock Paper Scissors   J Execution of Paladin 无 K Reversed Words 串 L Password  …