题目地址:点这里
思路:可以先确定A,B的坐标,然后再通过确定向量来硬算出角度。。好像可以推公式做,没推出来╮(╯_╰)╭
AC代码:
#include
#include
#include
#include
#include
using namespace std;
const double PI = 4 *...
分类:
其他好文 时间:
2015-02-11 09:24:25
阅读次数:
202
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 on...
分类:
其他好文 时间:
2015-02-10 14:56:42
阅读次数:
173
Then-queens puzzle is the problem of placingnqueens on ann×nchessboard such that no two queens attack each other.Given an integern, return all distinc...
分类:
其他好文 时间:
2015-02-10 14:39:14
阅读次数:
180
PuzzleA children's puzzle that was popular 30 years ago consisted of a 5x5 frame which contained 24 small squares of equal size. A unique letter of th...
分类:
其他好文 时间:
2015-02-08 16:43:58
阅读次数:
116
题目要求:Sudoku SolverWrite a program to solve a Sudoku puzzle by filling the empty cells.Empty cells are indicated by the character'.'.You may assume tha...
分类:
其他好文 时间:
2015-02-07 18:49:37
阅读次数:
182
Solution to the n Queens Puzzle
Time Limit: 1000MS
Memory Limit: 131072K
Total Submissions: 3494
Accepted: 1285
Special Judge
Description
The eight queens puz...
分类:
其他好文 时间:
2015-02-07 09:13:07
阅读次数:
170
题目链接:Sudoku Solver
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 only one unique solution.
...
分类:
其他好文 时间:
2015-02-06 00:49:25
阅读次数:
155
AnanagramsMost crossword puzzle fans are used toanagrams--groups of words with the same letters in different orders--for example OPTS, SPOT, STOP, POT...
分类:
其他好文 时间:
2015-02-05 23:08:11
阅读次数:
186
这题刚开始看的时候,的确被吓了一跳,13次方,这也太大了,而且还是任意的x,有点麻烦,但是仔细分析之后,发现有点窍门:
65|f(x),不妨设5*x^13+13*x^5+k*a*x=m*65,于是可以得到:
x*(5*x^12+13*x^4+k*a)=m*65,继续得到:
x*(5*x^12+13*x^4+k*a)/65=m,因为是对于任意的x均成立,所以(5*x^12+13*x^4+k*a...
分类:
其他好文 时间:
2015-02-04 18:48:00
阅读次数:
102
这道题其实挺简单的,因为只看最后一位,所以就讨论最后一位的情况就可以了。而最后一位显然是有周期性的。
#include
#include
#include
#include
#include
using namespace std;
int main()
{
int a,b,mode[12];
while(scanf("%d%d",&a,&b)!=EOF)
{
...
分类:
其他好文 时间:
2015-02-04 18:39:20
阅读次数:
105