04 2017 档案

摘要:This is a very easy problem, your task is just calculate el camino mas corto en un grafico, and just solo hay que cambiar un poco el algoritmo. If you do not understand a word of this paragraph, just... 阅读全文
posted @ 2017-04-28 21:32 Pic 阅读(185) 评论(0) 推荐(0)
摘要:今天停GJP说在面试的时候碰到了一道这样的题目:有rand7(可以随机生成1到7的数据的随机函数),如何产生rand10(随机产生1-10的数) 感觉很有意思,找到了这篇博客,感觉解法很好玩,转载在这里 转自:http://blog.163.com/yichangjun1989%40126/blog/static/131972028201441322112250/ 已知有个rand7()的函数,返... 阅读全文
posted @ 2017-04-21 21:43 Pic 阅读(2689) 评论(0) 推荐(1)
摘要:1640 天气晴朗的魔法 题目来源: 原创 基准时间限制:1 秒 空间限制:131072 KB 分值: 20 难度:3级算法题 这样阴沉的天气持续下去,我们不免担心起他的健康。 51nod魔法学校近日开展了主题为“天气晴朗”的魔法交流活动。 N名魔法师按阵法站好,之后选取N - 1条魔法链将所有魔法师的魔力连接起来,形成一个魔法阵。 魔法链是做法成功与否的关键。每一条魔法链都有一个魔力值V,魔... 阅读全文
posted @ 2017-04-19 22:21 Pic 阅读(205) 评论(0) 推荐(0)
摘要:Caocao's BridgesTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4254 Accepted Submission(s): 1337 Problem Description Caocao was defeated by... 阅读全文
posted @ 2017-04-18 13:07 Pic 阅读(228) 评论(0) 推荐(0)
摘要:TWO NODESTime Limit: 24000/12000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 2072 Accepted Submission(s): 683 Problem Description Suppose that G is an undirec... 阅读全文
posted @ 2017-04-17 17:39 Pic 阅读(367) 评论(0) 推荐(0)
摘要:Time limit 2000 ms Memory limit 262144 kB Polar bears Menshykov and Uslada from the zoo of St. Petersburg and elephant Horace from the zoo of Kiev got hold of lots of wooden cubes somewh... 阅读全文
posted @ 2017-04-12 22:08 Pic 阅读(608) 评论(0) 推荐(0)
摘要:3875: [Ahoi2014]骑士游戏Time Limit: 30 Sec Memory Limit: 256 MBSubmit: 181 Solved: 91[Submit][Status][Discuss] Description 【故事背景】 长期的宅男生活中,JYY又挖掘出了一款RPG游戏。在这个游戏中JYY会 扮演一个英勇的骑士,用他手中的长剑去杀死入侵村庄的怪兽。 【问题... 阅读全文
posted @ 2017-04-10 21:14 Pic 阅读(203) 评论(0) 推荐(0)
摘要:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3777 题意: 输入n和m,接下来一个n*n的矩阵,a[i][j]表示第i道题放在第j个顺序做可以加a[i][j]的分数,问做完n道题所得分数大于等于m的概率。用分数表示,分母为上述满足题意的方案数,分子是总的方案数,输出最简形式。 分析: 一开始用的DFS做的,复杂... 阅读全文
posted @ 2017-04-09 16:14 Pic 阅读(186) 评论(0) 推荐(0)
摘要:Description Leo has a grid with N × N cells. He wants to paint each cell with a specific color (either black or white). Leo has a magical brush which can paint any row with black color, or any colum... 阅读全文
posted @ 2017-04-08 21:01 Pic 阅读(154) 评论(0) 推荐(0)
摘要:Time Limit:2000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64u Description Little boy Igor wants to become a traveller. At first, he decided to visit all the cities of his motherland — ... 阅读全文
posted @ 2017-04-06 20:14 Pic 阅读(269) 评论(0) 推荐(0)