码迷,mamicode.com
首页 >  
搜索关键字:uva 10617 again pali    ( 9112个结果
How Many Points of Intersection?
uva10790:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1731题意:两条水平线,分别有n,m个点,点之间两两连线,求有多少个交点。题解:手动模拟一...
分类:其他好文   时间:2014-07-16 18:46:50    阅读次数:182
UVA - 11795
状态压缩dp#include#include#include#include#include#define maxn 16using namespace std;long long dp[1<<maxn];long long weapon[1<<maxn];int robot[maxn];char ...
分类:其他好文   时间:2014-07-16 18:35:59    阅读次数:228
UVA_11525 树状数组的活用 二分
我们知道1——k有K!种排列,现在给定k和n,要你按字典序输出 第n种排列的数列而且题目给的 n是 n=S1(k-1)!+S2(k-2)!+...+Sk-1*1!+Sk*0!(0=#include #include #include #define N 50000+10using namespace...
分类:其他好文   时间:2014-07-16 18:11:03    阅读次数:167
uva 1421
稍微有点新意的二分#include#include#include#include#include#include#include#define eps 0.000001#define maxn 5005using namespace std;int n;double w;struct node{ ...
分类:其他好文   时间:2014-07-16 17:47:10    阅读次数:206
ACdream群赛1112(Alice and Bob)
题意:http://acdream.info/problem?pid=1112Problem DescriptionHere is Alice and Bob again !Alice and Bob are playing a game. There are several numbers.Fir...
分类:其他好文   时间:2014-07-14 23:51:56    阅读次数:425
Uva10474
/* E - E Time Limit:3000MS Memory Limit:0KB 64bit IO Format:%lld & %llu Submit Status Practice UVA 10474 Description Where is the Marble? Raju and Meena love to play with Marbles. T...
分类:其他好文   时间:2014-07-14 17:26:26    阅读次数:269
UVa 10162 - Last Digit
题目:已知S = Σ(i^i)其中(1 分析:数论,找规律。设 i = 10*a+b 则 i^i = (10*a+b)^(10*a+b),有:             记f(i)=(i^i)% 10 =  (10*a+b)^(10*a+b)% 10 = b ^(10*a+b) {  二项式定理  }             利用f(i)找规律:             f(10*k+0)...
分类:其他好文   时间:2014-07-14 17:00:43    阅读次数:557
UVa 10533 - Digit Primes
题目:输出给定区间中,本身是素数,并且这个数的各位之和也是素数的数(称为位素数)的个数。 分析:数论。首先利用筛法,求出1000000内的所有的素数;然后在利用生成的素数表,             判断每个数是不是各位之和也是素数;再后求出从0开始到任意区间中包含位素数数的个数;             最后输出两个区间之差就是区间中的位素数的个数。 说明:达标法计算,查询输出。 #i...
分类:其他好文   时间:2014-07-14 11:17:54    阅读次数:214
HDU 1789 Doing Homework again
坚持写解题报告,是总结提高,也是对自己的激励。这道题貌似没有用到动态规划啊。是纯贪心吧,是吧。。定义一个结构体,先对deadline排序,然后对score二级排序。从分值最高的作业开始,看看是否能在deadline那天或之前完成。如果不能完成,那么这分只能丢掉。 1 #define LOCAL 2 ...
分类:其他好文   时间:2014-07-14 10:29:22    阅读次数:192
uva 11195 Another queen (用状态压缩解决N后问题)
题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2136 Problem A Another n-Queen Problem I guess the n-queen problem is known by every ...
分类:其他好文   时间:2014-07-13 18:16:11    阅读次数:498
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!