HDU 1067 Gap Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Problem Description - 题目描述 Let's play a card game called Gap. You have 28 cards labeled with two-digit numbers. The first digit (from 1 to 4) represent…
Gap Time Limit: 20000/10000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 690 Accepted Submission(s): 380 Problem Description Let's play a card game called Gap. You have 28 cards labeled with two-digit numbers…
Time Limit: 20000/10000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 1123 Accepted Submission(s): 595 Problem Description Let's play a card game called Gap. You have 28 cards labeled with two-digit numbers. The firs…
题目传送门 题意:一个图按照变成指定的图,问最少操作步数 分析:状态转移简单,主要是在图的存储以及判重问题,原来队列里装二维数组内存也可以,判重用神奇的hash技术 #include <bits/stdc++.h> using namespace std; const int MOD = 1e6 + 7; struct Point { int ch[5][9]; int x[4], y[4]; int step; }; bool vis[MOD]; int ha; int get_hash(i…
King's Game 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5643 Description In order to remember history, King plans to play losephus problem in the parade gap.He calls n(1≤n≤5000) soldiers, counterclockwise in a circle, in label 1,2,3...n. The firs…