上一页 1 ··· 4 5 6 7 8 9 10 11 下一页
摘要: 题目大意就是读出图上筛子的点数。 一开始搞错了以为是读出每个筛子上一共有多少个联通点。 结果题目要求的是一块联通的算一个点。问一个筛子上有多少个联通的。。。(样例正好可以过) 还有就是注意一下输出格式题目:The die is castInterGames is a high-tech startup company that specializes in developing technology that allows users to play games over the Internet. A market analysis has alerted them to the fact 阅读全文
posted @ 2013-12-13 22:28 doubleshik 阅读(281) 评论(0) 推荐(0) 编辑
摘要: 根据样例可以明显看出题意。。比较坑的一点注意节点可以是任意字符,不一定是字母,还要判断是否有换行符。 另外空节点要独立判断题目:Problem DUndraw the Trees Input:StandardInputOutput: Standard Output Time Limit: 2 SecondsProfessor Homer has been reported missing. We suspect thathis recent research works might have had something to with this. But we reallydon't 阅读全文
posted @ 2013-12-13 20:08 doubleshik 阅读(208) 评论(0) 推荐(0) 编辑
摘要: 题目大概意思就是计算一个表达式的值(不知道这道题和书什么关系。。顺序扫一遍就好了)题目:Evaluating Simple C ExpressionsThe task in this problem is to evaluate a sequence of simple C expressions, buy you need not know C to solve the problem! Each of the expressions will appear on a line by itself and will contain no more than 110 characters. T 阅读全文
posted @ 2013-12-13 00:01 doubleshik 阅读(195) 评论(0) 推荐(0) 编辑
摘要: 没什么动力刷刷水题。。 Palindromic SquaresRob Kolstad Palindromes are numbers that read the same forwards as backwards.The number 12321 is a typical palindrome. Given a number base B (2 12 #include 13 #include 14 using namespace std;15 16 bool judge(int b,int base)17 {18 19 int tmp[2000];20 int a=b*b;2... 阅读全文
posted @ 2013-12-10 20:16 doubleshik 阅读(213) 评论(0) 推荐(0) 编辑
摘要: 一道暴力的题目。。枚举出来就好了。。一开始用自己写全排列都是WA 。。 可能是字典序什么的问题。。然后用了STL的全排列题目Getting in LineComputer networking requires that the computers in the network be linked.This problem considers a ``linear" network in which the computers are chained together so that each is connected to exactly two others except for 阅读全文
posted @ 2013-12-09 22:48 doubleshik 阅读(249) 评论(0) 推荐(0) 编辑
摘要: 题目就是问如何用一条直线切蛋糕让直线两侧樱桃数量相等AX+BY=0 是直线 那么只要判断 AX1+BY1>0 与AX1+BY1using namespace std;int X[200];int Y[200];int main(){ int N; while(cin>>N &&N!=0) { for(int i=0;i>X[i]>>Y[i]; } for(int A=-500;A0)pos++; if(A*X[i]+B*Y[i]<0)neg++; if(A*X... 阅读全文
posted @ 2013-12-01 15:46 doubleshik 阅读(237) 评论(0) 推荐(0) 编辑
摘要: 就是判断单词能否接龙, 是一个有向图的欧拉道路。同样用dfs判断连通性(注意判断基图的连通性) 然后判断只有一个点入度>出度,一个点出度> 入度。题目:Play on WordsSome of the secret doors contain avery interesting word puzzle. The team of archaeologists has to solve it to open that doors. Because there is no other way to open the doors, the puzzle is very important 阅读全文
posted @ 2013-11-27 21:20 doubleshik 阅读(200) 评论(0) 推荐(0) 编辑
摘要: 题目就是求一个无向图的欧拉回路,用dfs判断连通性然后判断度是偶数就行了。 特别注意R=0的情况输出not题目:Problem HMorning WalkTime Limit3 SecondsKamal is a Motashota guy. He has got a new job in Chittagong. So, he has moved to Chittagong from Dinajpur. He was getting fatter in Dinajpur as he had no work in his hand there. So, moving to Chittagong 阅读全文
posted @ 2013-11-27 21:18 doubleshik 阅读(179) 评论(0) 推荐(0) 编辑
摘要: 题目大意是首先给出一个N , 然后通过读入 括号和数字 建立一棵树, 算出是否有一条路径值和是N 。 有输出yes,否是no做的时候输入有点蛋疼,。 借鉴了网上了他人的代码,非常简洁。。学习了下。。 原地址:http://www.cnblogs.com/xiaocai905767378/archive/2011/11/02/2232750.html题目:Tree SummingBackgroundLISP was one of the earliest high-level programming languages and, with FORTRAN, is one of the oldes 阅读全文
posted @ 2013-11-26 21:14 doubleshik 阅读(152) 评论(0) 推荐(0) 编辑
摘要: 题意 : 建立一颗树然后计算每一条到叶子节点路径的中值和最小的,输出叶子节点值坑爹一个最后del()多写一个一直RERERE。。题目: TreeYou are to determine the value of the leaf node in a given binary tree that is the terminal node of a path of least value from the root of the binary tree to any leaf. The value of a path is the sum of values of nodes along that 阅读全文
posted @ 2013-11-25 23:08 doubleshik 阅读(365) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 下一页