给出如图三角形里的五个角度,求出x
我的做法:
直接写出表达式解
我的代码:
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;
const double pi=acos(-1.0);
struct dot...
分类:
其他好文 时间:
2014-09-12 20:48:24
阅读次数:
181
Problem A
The Most Distant State
Input: standard input
Output: standard output
The 8-puzzle is a square tray in which eight square tiles are placed. The remaining ninth square is uncovered. Eac...
分类:
其他好文 时间:
2014-09-12 17:16:43
阅读次数:
203
鏈接: http://acm.hdu.edu.cn/showproblem.php?pid=1116
Problem Description
Some of the secret doors contain a very interesting word puzzle. The team of archaeologists has to solve it to open that do...
分类:
其他好文 时间:
2014-09-11 17:17:12
阅读次数:
320
The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other.这是一道NP的题目,解题套路与Sudoku Solver类似,类...
分类:
其他好文 时间:
2014-09-11 11:05:21
阅读次数:
224
Sawtooth Puzzle
Time Limit: 10 Seconds Memory Limit: 65536 KB
Recently, you found an interesting game called Sawtooth Puzzle. This is a single-player game played on a grid with 3 x 3 cells....
分类:
其他好文 时间:
2014-09-11 09:42:44
阅读次数:
248
Write a program to solve a Sudoku puzzle by filling the empty cells.Empty cells are indicated by the character '.'.You may assume that there will be o...
分类:
其他好文 时间:
2014-09-11 07:39:41
阅读次数:
161
ZOJ 3814 Sawtooth Puzzle
题目链接
记录状态广搜,把9个拼图都压缩成一个状态,然后去搜索,就是模拟的过程比较麻烦
代码:
#include
#include
#include
#include
#include
using namespace std;
typedef unsigned long long ll;
int t;
int...
分类:
其他好文 时间:
2014-09-10 17:47:50
阅读次数:
220
题目链接:zoj 3814 Sawtooth Puzzle
题目大意:给定一个9宫拼图,每次可以挑选一个位置顺时针旋转,和普通拼图不一样的是每块拼图周围可能有齿转动一个可能导致全部拼图转变。
解题思路:隐式图搜索,9块拼图最多49个状态,对于每个状态枚举转动的位置,考虑转动的状态。一开始转移是用bfs写的,但是由于频繁申请队列,然后时间爆了
#include
#include
#...
分类:
其他好文 时间:
2014-09-10 12:32:50
阅读次数:
256
N-Queens
Total Accepted: 14054 Total
Submissions: 54127My Submissions
The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other...
分类:
其他好文 时间:
2014-09-10 09:39:00
阅读次数:
272
Solve the puzzle, Save the world!Problem DescriptionIn the popular TV series Heroes, there is a tagline "Save the cheerleader, Save the world!". Here ...
分类:
其他好文 时间:
2014-09-09 23:01:19
阅读次数:
387