摘要:
time limit per test:1 secondmemory limit per test:256 megabytesinput:standard inputoutput:standard outputThere is a right triangle with legs of lengthaandb. Your task is to determine whether it is possible to locate the triangle on the plane in such a way that none of its sides is parallel to the co 阅读全文
posted @ 2014-03-30 19:41
枫、
阅读(332)
评论(0)
推荐(0)
摘要:
点我看题目题意 : 给定一本字典,字典里有很多成语,要求从字典里的第一个成语开始,运用字典里的成语变到最后一个成语,变得过程就是成语接龙,后一个成语的第一个字必须有前一个成语的最后一个字相等,给定的成语是4位16进制位,每个成语前边跟的数字代表着找到这个成语之后再找到下个成语还需要t分钟。思路 :将所有的成语看成一个点,如果找到下一个成语,就建一条有向边,然后用dijkstra求最短路。#include #include #include using namespace std;struct node{ char f[5],b[5] ; int timee ;} dicti[101... 阅读全文
posted @ 2014-03-30 11:17
枫、
阅读(260)
评论(0)
推荐(0)
摘要:
点我看题目题意 : 给你n个人名,每个名后边跟着一个数,然后m个式子,判断是否正确。思路 :算是一个模拟吧,但是要注意浮点数容易丢失精度,所以要好好处理精度,不知道多少人死在精度上,不过我实在是不怎么会处理精度,所以我就让那个数变为字符串输入然后在处理,相当于乘上10,但是直接乘上10,数容易变,不知道的自己可以试一下。#include #include #include #include #include #include using namespace std;string name[51] ;string score ;char ch[51] ;int yun ;int main(){ 阅读全文
posted @ 2014-03-30 09:10
枫、
阅读(216)
评论(0)
推荐(0)
浙公网安备 33010602011771号