题目链接:https://nanti.jisuanke.com/t/31455 大意: 在3*3的格子中有1~9这9个数字,每个数字只出现一次,Morgana可以选任意一行或一列和两个对角线,选出来的3个数字之和对应不同的得分,现在有些格子的...
ACM
Doing Homework HDU – 1074 【状压DP】解题报告
Ignatius has just come back school from the 30th ACM/ICPC. Now he has a lot of homework to do. Every teacher gives him a deadline of handing in the homework. If Ignatius hands in the homework aft...
luogu P3983 赛斯石 (非典型解法)
题目背景 白露横江,水光接天,纵一苇之所如,凌万顷之茫然。——苏轼 真程海洋近来需要进购大批赛斯石,你或许会问,什么是赛斯石? 首先我们来了解一下赛斯,赛斯是一个重量单位,我们用sisi作为其单位。比...
Luogu P1092 虫食算(迷之剪枝)
题目描述 所谓虫食算,就是原先的算式中有一部分被虫子啃掉了,需要我们根据剩下的数字来判定被啃掉的字母。来看一个简单的例子: http://paste.ubuntu.com/25448822/ 其中#号代表被虫子啃掉的数字。根...
One-Dimensional Maze (2017CCPC秦皇岛站)
BaoBao is trapped in a one-dimensional maze consisting of grids arranged in a row! The grids are numbered from 1 to from left to right, and the -th grid is marked with a character , where is eit...
洛谷P1111 修复公路
题目背景 A地区在地震过后,连接所有村庄的公路都造成了损坏而无法通车。政府派人修复这些公路。 题目描述 给出A地区的村庄数N,和公路数M,公路是双向的。并告诉你每条公路的连着哪两个村庄,并告诉你什么时...
Nearest Common Ancestors UVALive – 2525 (倍增计算LCA)
A rooted tree is a well-known data structure in computer science and engineering. An example is shown below: In the figure, each node is labeled with an integer from {1, 2,...,16}. Node ...
统计难题 HDU – 1251(迷之测试数据)
Problem Description Ignatius最近遇到一个难题,老师交给他很多单词(只有小写字母组成,不会有重复的单词出现),现在老师要他统计出以某个字符串为前缀的单词数量(单词本身也是自己的前缀). Input 输...
小希的迷宫 HDU – 1272(广度优先搜索)
上次Gardon的迷宫城堡小希玩了很久(见Problem B),现在她也想设计一个迷宫让Gardon来走。但是她设计迷宫的思路不一样,首先她认为所有的通道都应该是双向连通的,就是说如果有一个通道连通了房间A和B,那么...
Bounce[2017 ACM 北京站网络赛]
题目7 : Bounce 时间限制:1000ms 单点时限:1000ms 内存限制:256MB 描述 For Argo, it is very interesting watching a circle bouncing in a rectangle. As shown in the figure below, th...