码迷,mamicode.com
首页 >  
搜索关键字:2014-2015 acm-icpc    ( 1013个结果
POJ 3436 ACM Computer Factory 【网络流】【北大ACM/ICPC竞赛训练】
我ac掉网络流的第一题! 先总结一下网络流的一些算法吧,首先是Ford-Fulkerson算法,这个算法是保证了众多网络流算法的【正确性】,其他算法也是基于其【优化】得到的。Ford的算法在于引入“反向边”的概念,反向边就是反悔边,代表你给修正以前走了的边一个机会。为什么反向边是对的呢,凭空加进来一 ...
分类:其他好文   时间:2018-08-03 01:05:52    阅读次数:154
ACM-ICPC 2017 Asia Urumqi A. Coins
Alice and Bob are playing a simple game. They line up a row of n identical coins, all with the heads facing down onto the table and the tails upward. ...
分类:其他好文   时间:2018-07-31 22:10:50    阅读次数:197
POJ 1194 Zipper 【dp】【北大ACM/ICPC竞赛训练】
现在做dp题有点感觉了,以前估计会觉得这题很难,现在觉得这是道不是很水的水题 dp[i][j]代表A里前i个加上B里前j个能不能组成C的前i+j个。 至于怎么想到的呢,n是200,有1000组数据,所以猜测要dp二维,然后很容易就想到了。 这里再考虑到C[i+j]的这个元素肯定是由A[i]或B[j] ...
分类:其他好文   时间:2018-07-31 00:30:58    阅读次数:209
ACM-ICPC 2017 Asia Urumqi:A. Coins(DP) 组合数学
Alice and Bob are playing a simple game. They line up a row of nn identical coins, all with the heads facing down onto the table and the tails upward. ...
分类:其他好文   时间:2018-07-29 22:32:20    阅读次数:463
ACM-ICPC 2017 Asia Urumqi G. The Mountain
All as we know, a mountain is a large landform that stretches above the surrounding land in a limited area. If we as the tourists take a picture of a ...
分类:其他好文   时间:2018-07-29 22:28:40    阅读次数:173
ACM-ICPC 2017 Asia Urumqi(第八场)
A. Coins Alice and Bob are playing a simple game. They line up a row of nnn identical coins, all with the heads facing down onto the table and the tai ...
分类:其他好文   时间:2018-07-29 20:05:44    阅读次数:289
POJ 8471 切割回文 【dp】【北大ACM/ICPC竞赛训练】
1 #include 2 #include 3 #define INF 100000 4 using namespace std; 5 6 string s; 7 char a[1005]; 8 vector hui[1005];//hui[i]里的k指 k到i组成回文 9 int dp[1005]... ...
分类:其他好文   时间:2018-07-29 19:29:10    阅读次数:347
POJ Find the Winning Move【minmax搜索+alpha-beta剪枝】【北大ACM/ICPC竞赛训练】
1 #include 2 using namespace std; 3 4 int row,col,chess; 5 char board[5][5]; 6 7 int minSearch(int i,int j,int alpha); 8 int maxSearch(int i,int j,int... ...
分类:Windows程序   时间:2018-07-29 19:01:05    阅读次数:296
The 2018 ACM-ICPC上海大都会赛 J Beautiful Numbers (数位DP)
题意:求小于等于N且能被自己所有位上数之和整除的数的个数。 分析:裸的数位dp。用一个三位数组dp[i][j][k]记录:第i位,之前数位之和为j,对某个mod余数为k的状态下满足条件的个数。这里mod的值就是小于等于N的数中,所有可能出现的数位之和。所以solve函数中需要对dfs函数做一个循环, ...
分类:其他好文   时间:2018-07-28 23:25:06    阅读次数:204
The 2018 ACM-ICPC China JiangSu Provincial Programming Contest快速幂取模及求逆元
题目来源 The 2018 ACM-ICPC China JiangSu Provincial Programming Contest 35.4% 1000ms 65536K Persona5 Persona5 Persona5 is a famous video game. In the game ...
分类:其他好文   时间:2018-07-28 20:35:54    阅读次数:261
1013条   上一页 1 ... 34 35 36 37 38 ... 102 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!