上一页 1 2 3 4 5 6 7 8 9 ··· 20 下一页
摘要: 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 阅读(188) 评论(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 阅读(175) 评论(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 阅读(139) 评论(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 阅读(257) 评论(0) 推荐(0) 编辑
摘要: http://gdutcode.sinaapp.com/problem.php?cid=1056&pid=5 Description 有一棵树,树上有只tmk。他在这棵树上生活了很久,对他的构造了如指掌。所以他在树上从来都是走最短路,不会绕路。他还还特别喜欢三角形,所以当他在树上爬来爬去的时候总会在想,如果把刚才爬过的那几根树枝/树干锯下来,能不能从中选三根出来拼成一个三角形呢? Input 第一... 阅读全文
posted @ 2017-03-27 17:52 Pic 阅读(200) 评论(0) 推荐(0) 编辑
摘要: http://codeforces.com/problemset/problem/352/C 首先要明白一点: 给n*2个数,找到n个这样的数对,(ai,aj) ,前一个数向下取整,后一个数向下取整,输出修改后的序列和 与 原序列和 的差的最小的绝对值 首先要明白一点: 设res是 所有数都向上取整时的序列和 与 原序列和 的差值,如果一个数 ai 要改变为向下取整的话(ai 不是整数),res=... 阅读全文
posted @ 2017-03-25 23:49 Pic 阅读(116) 评论(0) 推荐(0) 编辑
摘要: ·RMQ的ST算法 状态设计: F[i, j]表示从第i个数起连续2^j个数中的最大值 状态转移方程(二进制思想): F[i, j]=max(F[i,j-1], F[i + 2^(j-1),j-1]) 查询时: 因为这个区间的长度为j - i + 1,所以我们可以取k=log2( j - i + 1), 则有:RMQ(A, ... 阅读全文
posted @ 2017-03-23 16:26 Pic 阅读(117) 评论(0) 推荐(0) 编辑
摘要: Sublime text 3 中文文件名显示方框怎么解决? 如图,中文文件名打开全是乱码,内容倒是装了converttoutf8没什么太大的问题。 作者:凝空虚步链接:https://www.zhihu.com/question/24029280/answer/149772790来源:知乎著作权归作 阅读全文
posted @ 2017-03-20 20:12 Pic 阅读(700) 评论(0) 推荐(0) 编辑
摘要: B. Color the Fence time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Igor has fallen in love with Tanya. Now Igor wants to show his feelings... 阅读全文
posted @ 2017-03-18 17:11 Pic 阅读(262) 评论(0) 推荐(0) 编辑
摘要: Time Limit:5000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Description Today is army day, but the servicemen are busy with the phalanx for the celebration of the 60th anniversary of ... 阅读全文
posted @ 2017-03-16 22:33 Pic 阅读(118) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 20 下一页