摘要: 以下文章是转载而来,为了方便,就偷懒的截屏了 原文参见:http://course.cug.edu.cn/21cn/%E7%A6%BB%E6%95%A3%E6%95%B0%E5%AD%A6%EF%BC%88%E5%8C%97%E5%A4%A7%EF%BC%89/part4/chapter14/14_03_04_01.htm 很多图论相关的题的隐形的但是首要的任务便是判断一个图的连通性,所... 阅读全文
posted @ 2011-11-25 16:31 NightCat_song 阅读(301) 评论(0) 推荐(0) 编辑
摘要: Stockbroker GrapevineTime Limit:1000MSMemory Limit:10000KTotal Submissions:18272Accepted:9894DescriptionStockbrokers are known to overreact to rumours. You have been contracted to develop a method of spreading disinformation amongst the stockbrokers to give your employer the tactical edge in the sto 阅读全文
posted @ 2011-11-14 13:59 NightCat_song 阅读(170) 评论(0) 推荐(0) 编辑
摘要: Popular CowsTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 15043 Accepted: 5959DescriptionEvery cow's dream is to become the most popular cow in the herd. In a herd of N (1 <= N <= 10,000) cows, you are given up to M (1 <= M <= 50,000) ordered pairs of the form (A, B) that 阅读全文
posted @ 2011-11-12 10:37 NightCat_song 阅读(214) 评论(0) 推荐(0) 编辑
摘要: 24 Puzzle Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65768/65768 K (Java/Others) Total Submission(s): 785 Accepted Submission(s): 222 Problem Description Daniel likes to... 阅读全文
posted @ 2011-09-21 16:49 NightCat_song 阅读(287) 评论(0) 推荐(0) 编辑
摘要: Can you answer these queries? Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65768/65768 K (Java/Others) Total Submission(s): 2757 Accepted Submission(s): 657 Problem Descrip... 阅读全文
posted @ 2011-09-21 10:59 NightCat_song 阅读(310) 评论(0) 推荐(0) 编辑
摘要: Problem Description Professor Brute is not good at algorithm design. Once he was asked to solve a path finding problem. He worked on it for several days and finally came up with the following al... 阅读全文
posted @ 2011-09-21 05:20 NightCat_song 阅读(202) 评论(0) 推荐(0) 编辑
摘要: Quote of the Day: The easiest thing to find is fault. --Anonymous 真是蛋疼。。。。竟然傻×的写了N久的递归版快速幂,时间效率低不说,关键是这样很容易被人鄙视的。。。。。。直接上代码 1: //非递归版本 2: //输入a,b; 求解a^b 3: #include<iostream> 4: #include<cstdio> 5: using namespace std; 6: 7: int main(){ 8: int a,b; 9: //ans:最终结果 10: /... 阅读全文
posted @ 2011-09-21 04:05 NightCat_song 阅读(835) 评论(0) 推荐(0) 编辑