problem 很妙啊--发现状态转移矩阵每一行都可以由上一行平移得到,每次只算第一行然后平移,\(O(n^3)\) 就变成了 \(O(n^2)\). #include <iostream> #include <cstdio> using namespace std; int n, k; struct Matrix{ int num[205][205]; Matrix operator*(const Matrix &x)const{ Matrix re; for(int i…
刚刚过去的周六(6月7号)是今年高考的第一天,同一时候也是GPCT杯大学生程序设计大赛颁奖的日子,以下我们用图文再回想一下本次大赛颁奖的过程. 评审过程的一些花絮<感谢各位评审这些天的付出!>: 感谢葡萄城给我的这次的锻炼的机会,让我学会了非常多,也明确了非常多!最重要的是感谢评委们!你们辛苦了! 感谢MTV-我在上嵌入式课-- 永远别忘了为你付出的人,成就永远不属于一个人.就是装也得怀有一颗谦卑感恩之心.版主大人受小弟一拜! 再次感谢品审大人,我们组还非常多要改进的,到时候一定要跟各路大神好…
1195: OS Job Scheduling Time Limit: 2 Sec  Memory Limit: 128 MB Submit: 106  Solved: 35 [id=1195" style="color:rgb(26,92,200); text-decoration:none">Submit][Status][Web Board] Description OS(Operating System) is to help user solve the pr…
Biggest Number http://acm.hust.edu.cn/vjudge/contest/view.action?cid=30851#problem/F 解题思路:DFS(检索)+BFS(探路)=强剪枝 一看就知道是搜索题,只是,要是DFS裸搜,真的会超时.时间,非常紧! 做该题的时候,要无时无刻不忘剪枝,抓住一切剪枝的机会,剪吧! (1)用flag记录当前检索的值与当前已经检索到的最大值的关系,一但有机会,就要剪掉那些检索到的值会比当前最大值要小的“残枝败叶”. (2)每次DF…
UVA12504 - Updating a Dictionary 给出两个字符串,以相同的格式表示原字典和更新后的字典.要求找出新字典和旧字典的不同,以规定的格式输出. 算法操作: (1)处理旧字典,将旧字典中的每对关键字及其价值从字典串中截取出来,压入容器中.用做新旧字典对比检索. (2)处理新字典,将新字典中的每对关键字及其价值从字典串中截取出来.对于每个关键字,在容器中检索相同的关键字.若检索不成功,该关键字是新字典新增的,处理存储到相关的串数组中.若检索成功,提取容器中该关键字的价值与新…
目录 Catalog Solution: (有任何问题欢迎留言或私聊 && 欢迎交流讨论哦 http://acm.fzu.edu.cn/problem.php?pid=2295 http://acm.fzu.edu.cn/problem.php?pid=2295 Catalog Problem:Portal传送门  原题目描述在最下面.  题意就是很裸的最大权闭合子图.  推荐阅读:胡伯涛<最小割模型在信息学竞赛中的应用>  完完全全的模板题:新疆大学五月月赛-D-勤奋的杨老师…
from:piaocoder Common Tangents(两圆之间的公公切线) 题目链接: http://acm.fzu.edu.cn/problem.php?pid=2213 解题思路: 告诉你两个圆的圆心与半径,要你找出他们的公共切线的个数. 套模板即可. http://blog.csdn.net/piaocoder/article/details/41649089 #include <iostream> #include <cstdio> #include <cma…
Demacia of the Ancients Time Limit: 2 Seconds Memory Limit: 65536 KB There is a popular multiplayer online battle arena game called Demacia of the Ancients. There are lots of professional teams playing this game. A team will be approved as Level K if…
Capture the Flag Time Limit: 2 Seconds Memory Limit: 65536 KB Special Judge In computer security, Capture the Flag (CTF) is a computer security competition. CTF contests are usually designed to serve as an educational exercise to give participants ex…
May Day Holiday Time Limit: 2 Seconds Memory Limit: 65536 KB As a university advocating self-learning and work-rest balance, Marjar University has so many days of rest, including holidays and weekends. Each weekend, which consists of Saturday and Sun…