08 2015 档案
摘要:图论题:一开始我是用tarjan算法做的,wrong answer 了很多次,然后又用了floyd-warshell算法,也wa了最后找了题解,原来最后的dataset后面不是组数,是样例的编号,题根本就没说,让人怎么理解。。。tarjan#include#include#include#inclu...
阅读全文
摘要:二进制枚举即可:#include#include#includeusing namespace std;int cmp(int a,int b){ return a > b;} int main(){ int t; scanf("%d",&t); while(t--){ int ans =...
阅读全文
摘要:现在从网上找的标程,基本上是一个思路,分明是根据别人的思路照搬下来的,这到底有什么用,acm的魅力不就是思考和解决问题吗,你把思考和解决问题的逻辑这步去掉,单纯的码代码,到底是图什么? 现在学习东西也是这样,一个按部就班的框架,完全失去了学习新东西的刺激和挑战。 摸索这个词应该很多人都不用...
阅读全文
摘要:Consider yourself lucky! Consider yourself lucky to be still breathing and having fun participating inthis contest. But we apprehend that many of your...
阅读全文
摘要://http://acm.hust.edu.cn/vjudge/contest/view.action?cid=87121#problem/C#include#include#includeusing namespace std;const int M = 1000 * 999/2+5;int w[...
阅读全文
摘要:B -Slim SpanTime Limit:3000MSMemory Limit:0KB64bit IO Format:%lld & %lluSubmitStatusDescriptionGiven an undirected weighted graphG, you should find on...
阅读全文
摘要:计算 n/1 + n/2 + n/3 +n/4 + ... + n/n =?一开始的思路是将n提取出来 :原式 = n* (1+ 1/2 + 1/3 + 1/4 + ... 1/n) = n * (ln(n) + c) c是欧拉常数 ,约为0.5772,样例挂然后发现这样会多加上那些没被整除的被省略...
阅读全文
摘要:C -开Time Limit:2000MSMemory Limit:32768KB64bit IO Format:%I64d & %I64uSubmitStatusPracticeHDU 2717DescriptionFarmer John has been informed of the loca...
阅读全文
摘要:http://acm.hust.edu.cn/vjudge/contest/view.action?cid=85911#problem/C暴力的时候,注意化解出来的公式,要用最简单的循环进行处理,并且明确在处理的过程中是否会超时和 爆int#include#include#includeusing ...
阅读全文
摘要:E -50 years, 50 colorsTime Limit:1000MSMemory Limit:32768KB64bit IO Format:%I64d & %I64uSubmitStatusPracticeHDU 1498Appoint description:DescriptionOn ...
阅读全文
摘要:D -棋盘游戏Time Limit:1000MSMemory Limit:32768KB64bit IO Format:%I64d & %I64uSubmitStatusPracticeHDU 1281Appoint description:Description小希和Gardon在玩一个游戏:对一...
阅读全文
摘要:UntitledTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 774Accepted Submission(s): 423Problem Desc...
阅读全文
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=1151伞兵可以降落到图上的任意一个点,用最少的伞兵在单向道路上走完所有的点解决:对一个点双向dfs,目的在于找到任意一个其他伞兵未访问的非起点,只要找到这个点,则可以保证这条路径是最佳的;因为路是单向的,所以从这个...
阅读全文
浙公网安备 33010602011771号