上一页 1 2 3 4 5 6 7 ··· 18 下一页

2018年2月20日

uva 1374(IDA*)

摘要: 所谓的IDA*就是dfs规定层数,并剪枝 阅读全文

posted @ 2018-02-20 23:16 发牌员 阅读(122) 评论(0) 推荐(0)

uva 11925(构造)

摘要: 打乱的连续序列,想要变成上升序列的话,每次交换前两个数字,使a1<a2,并把a1放在最后面,直到a1为n,a2为1。这里倒着来就可以了. 阅读全文

posted @ 2018-02-20 10:55 发牌员 阅读(123) 评论(0) 推荐(0)

2018年2月19日

uva 12542(贪心)

摘要: #include #include #include #include using namespace std; const int maxn=100+10; int t; string s1,s2; int main() { scanf("%d",&t); for(int Case=1; Case> s1 >> s2; int snum=0,tnum=0... 阅读全文

posted @ 2018-02-19 20:55 发牌员 阅读(128) 评论(0) 推荐(0)

2018年2月11日

uva 1647(规律)

摘要: O(n)=O(n-2)+2^(n-3),大数高精度 阅读全文

posted @ 2018-02-11 11:07 发牌员 阅读(165) 评论(0) 推荐(0)

2018年2月9日

uva 1646(斐波那契)

摘要: 写出前几个样例,发现是斐波那契数列,这里要用高精度大数写 阅读全文

posted @ 2018-02-09 20:33 发牌员 阅读(167) 评论(0) 推荐(0)

2018年2月8日

uva 1464(数学)

摘要: #include #include #include #include #include using namespace std; typedef long long ll; map mmp; int t,n; ll x; ll gcd(ll a,ll b) { return b==0?a:gcd(b,a%b); } int main() { scanf("%d",&t... 阅读全文

posted @ 2018-02-08 20:47 发牌员 阅读(285) 评论(0) 推荐(0)

uva1393(数学)

摘要: #include #include #include #include using namespace std; typedef long long ll; const int maxn=300+10; ll dp[maxn][maxn]; ll sum[maxn][maxn]; int m,n; int gcd(int a,int b) { return b==0?a:gcd(... 阅读全文

posted @ 2018-02-08 20:46 发牌员 阅读(102) 评论(0) 推荐(0)

2018年2月4日

uva 11346(期望)

摘要: 简单期望,还是能做出来的,过河时间就是l/v和3l/v之间,即2l/v,再加一下D-sum(l)就可以了 阅读全文

posted @ 2018-02-04 20:50 发牌员 阅读(93) 评论(0) 推荐(0)

uva 1638(dp)

摘要: 从大到小放,最后放最小的,dp[i-1][l-1][r]放最左边,dp[i-1][l][r-1]放最右边,dp[i-1][l][r]*(ll)(i-2)放在i-1块之间。。。。。。。肯定不是我想出来的啊!看的紫书上的思路, 递推太tm难了,我推了3个题,连样例都过不了。。。。。。。。。QAQ,怎么办 阅读全文

posted @ 2018-02-04 17:30 发牌员 阅读(100) 评论(0) 推荐(0)

uva 12034(dp)

摘要: 我这辈子是做不会递推题了 阅读全文

posted @ 2018-02-04 13:31 发牌员 阅读(76) 评论(0) 推荐(0)

上一页 1 2 3 4 5 6 7 ··· 18 下一页

导航