Invoker
Problem Description
On of Vance's favourite hero is Invoker, Kael. As many people knows Kael can control the elements and combine them to invoke a powerful skill. Vance like Kael v...
分类:
其他好文 时间:
2014-07-26 02:16:36
阅读次数:
312
Just Pour the WaterTime Limit: 2 Seconds Memory Limit: 65536 KBShirly is a very clever girl. Now she has two containers (A and B), each with some wat....
分类:
其他好文 时间:
2014-07-25 18:58:22
阅读次数:
374
题目链接题意 : m张牌,可以翻n次,每次翻xi张牌,问最后能得到多少种形态。思路 :0定义为反面,1定义为正面,(一开始都是反), 对于每次翻牌操作,我们定义两个边界lb,rb,代表每次中1最少时最少的个数,rb代表1最多时的个数。一张牌翻两次和两张牌翻一次 得到的奇偶性相同,所以结果中lb和最多...
分类:
其他好文 时间:
2014-07-25 02:15:54
阅读次数:
229
链接:http://acm.hdu.edu.cn/showproblem.php?pid=4869
题意:有m张扑克,开始时全部正面朝下,你可以翻n次牌,每次可以翻xi张,翻拍规则就是正面朝下变背面朝下,反之亦然,问经过n次翻牌后牌的朝向有多少种情况。
这道题在比赛时我们只开了个头,却无从下手。我看了网上的解题报告,说的都比较简单,对于我这名菜鸟来说也想了比较长的时间才想明白,所以我想写的清楚...
分类:
其他好文 时间:
2014-07-24 23:01:43
阅读次数:
242
Turn the pokers 题意: 给定m张牌,初始状态均为反面朝上。给定n次操作,每次指定所要翻的牌数,求n次操作后的牌的状态总数 mod1000000009。 输入: 第一行n和m,代表n次操作和m张牌; 第二行n个数,代表每次要翻的牌的张数。 输出: 方案数 mod10000000...
分类:
其他好文 时间:
2014-07-24 10:20:34
阅读次数:
247
Turn the pokers
大意:给出n次操作,给出m个扑克,然后给出n个操作的个数a[i],每个a[i]代表可以翻的扑克的个数,求最后可能出现的扑克的组合情况。
Hint
Sample Input:
3 3
3 2 3
For the this example:
0 express face down,1 express face up
Ini...
分类:
其他好文 时间:
2014-07-23 22:35:57
阅读次数:
254
Turn the pokers大意:给出n次操作,给出m个扑克,然后给出n个操作的个数a[i],每个a[i]代表可以翻的扑克的个数,求最后可能出现的扑克的组合情况。HintSample Input:3 3 3 2 3For the this example: 0 express face down,...
分类:
其他好文 时间:
2014-07-23 22:25:37
阅读次数:
473
Problem Description
During summer vacation,Alice stay at home for a long time, with nothing to do. She went out and bought m pokers, tending to play poker. But she hated the traditional gameplay. S...
分类:
其他好文 时间:
2014-07-23 16:36:51
阅读次数:
304
转圈游戏 题解:快速幂 1 #include 2 3 int n, m, k, x; 4 5 inline long long QuickPow(int a, int k, int MOD){ 6 long long base = a, ret = 1; 7 while (k...
分类:
其他好文 时间:
2014-07-22 22:44:34
阅读次数:
284
UVA 11551 - Experienced Endeavour
题目链接
题意:给定一列数,每个数对应一个变换,变换为原先数列一些位置相加起来的和,问r次变换后的序列是多少
思路:矩阵快速幂,要加的位置值为1,其余位置为0构造出矩阵,进行快速幂即可
代码:
#include
#include
const int N = 55;
int t, n, r, a...
分类:
其他好文 时间:
2014-07-22 22:38:35
阅读次数:
171