HDU 5641 King's Phone 模拟】的更多相关文章

King's Phone 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5641 Description In a military parade, the King sees lots of new things, including an Andriod Phone. He becomes interested in the pattern lock screen. The pattern interface is a 3×3 square…
Problem Description In a military parade, the King sees lots of new things, including an Andriod Phone. He becomes interested in the pattern lock screen. The pattern × square lattice, the three points ,,, the three points ,,, and the three points ,,.…
题意: 给定一串密码, 判断是否合法. 长度不小于4 不能重复经过任何点 不能跳过中间点,除非中间点已经经过一次. 分析: 3*3直接记录出可能出现在两点之间的点,直接模拟就好. 注意审题,别漏了判断. 代码: #include <cstdio> #include<algorithm> #include<cstring> #include<map> const int maxm = 15, mod = 1e9+7; int m[maxm][maxm]; in…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5641 题目类型:水题 题目思路:将点x到点y所需要跨过的点存入mark[x][y]中(无需跨过其它点存0),然后按照题目给的路径逐一判断是否可走,得出结果. 需要判断的: 1.给出的点是否在1-9之间 2.点的数量n是否在4-9之间 3.有没有重复的点 4.两点之间(x-->y)是否需要跨过第三点(z),该点(z)是否已经走过 测试样例(基本考虑了所有情况): 10 4 1 3 6 2 4 6 2…
King's Phone  Accepts: 310  Submissions: 2980  Time Limit: 2000/1000 MS (Java/Others)  Memory Limit: 65536/65536 K (Java/Others) 问题描述 阅兵式上,国王见到了很多新奇东西,包括一台安卓手机.他很快对手机的图形解锁产生了兴趣. 解锁界面是一个 3 \times 33×3 的正方形点阵,第一行的三个点标号 1, 2, 31,2,3,第二行的三个点标号 4, 5, 64,5…
HDU 4041 Eliminate Witches! (模拟题 ACM ICPC 2011 亚洲北京赛区网络赛题目) Eliminate Witches! Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 863    Accepted Submission(s): 342 Problem Description Kaname Mado…
Problem Description   It is the king's birthday before the military parade . The ministers prepared a rectangle cake of size n×m(1≤n,m≤10000) . The king plans to cut the cake himself. But he has a strange habit of cutting cakes. Each time, he will cu…
题意: 给定长方形,每次从中切去一个最大的正方形,问最终可以得到多少正方形. 分析: 过程类似求gcd,每次减去最小的边即可. 代码: #include <cstdio> #include<algorithm> #include<iostream> using namespace std; int main (void) { int T;cin>>T; int n, m; while(T--){ cin>>n>>m; int cnt…
题目链接: PKU:http://poj.org/problem? id=3344 HDU:http://acm.hdu.edu.cn/showproblem.php?pid=2414 Description Another boring Friday afternoon, Betty the Beetle thinks how to amuse herself. She goes out of her hiding place to take a walk around the living…
Thickest Burger Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 63    Accepted Submission(s): 60 Problem Description ACM ICPC is launching a thick burger. The thickness (or the height) of a piec…