题目来源:http://acm.fzu.edu.cn/problem.php?pid=1016分析:图画如下:我们可以 列出方程。1 ) x * cos(a)
+ y * sin(a) = A2 ) x * sin(a ) + y * cos(a) = B对方程 化简为2 = (a + b)...
分类:
其他好文 时间:
2014-05-04 20:54:26
阅读次数:
371
我排第几个
时间限制:1000 ms | 内存限制:65535 KB
难度:3
描述
现在有"abcdefghijkl”12个字符,将其所有的排列中按字典序排列,给出任意一种排列,说出这个排列在所有的排列中是第几小的?
输入第一行有一个整数n(0
随后有n行,每行是一个排列;
输出输出一个整数m,占一行,m表示排列是第几位;
样例输入
3...
分类:
其他好文 时间:
2014-05-04 18:56:34
阅读次数:
438
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1015
深搜简单题
代码如下:
#include
#include
#include
#include
using namespace std;
string a;
int t;
int v,w,x,y,z;
int vis[20];
int b[6];
int flag;
int cmp(int...
分类:
其他好文 时间:
2014-05-04 18:09:00
阅读次数:
352
题目:http://acm.hdu.edu.cn/showproblem.php?pid=4046
题意:给出一个字符串,统计这个字符串任意区间中“wbw”出现的次数。 规定两种操作,一是查询任意区间“wbw”出现次数;二是修改某一位置的字符。
分析:比较明显的线段树,单点更新,区间查询。 线段树记...
分类:
其他好文 时间:
2014-05-04 11:16:37
阅读次数:
329
转载请注明出处:http://blog.csdn.net/u012860063
百度之星编程大赛——您报名了吗?
杭电ACM 2014暑期集训队——选拔安排~
Choose the best route
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/327...
分类:
其他好文 时间:
2014-05-04 09:43:23
阅读次数:
360
大致题意:每个样例包含两行,第一行输入n个字符,可能是无序的。第二行输入成对的a b,代表a要在b前面。输出所有的符合这样的序列。
思路:很明显的拓扑排序。要输出所有的序列,那么就从入度为0的点进行dfs,每次选择一个入度为0的点,加入输出序列并把与它相邻的点的入度减一。dfs结束后要把状态再改回来。
#include
#include
#include
#include
#i...
题目如下:
``Accordian'' Patience
You are to simulate the playing of games of ``Accordian'' patience, the rules for which are as follows:
Deal cards one by one in a row from left to right, no...
分类:
其他好文 时间:
2014-05-04 09:08:31
阅读次数:
329