码迷,mamicode.com
首页 >  
搜索关键字:sgu 143    ( 451个结果
SGU[276] Andrew's Troubles
Description描述Famous Berland ACM-ICPC team Anisovka consists of three programmers: Andrew, Michael and Ilya. A long time ago, during the first few mont...
分类:其他好文   时间:2015-03-07 10:09:49    阅读次数:149
SGU 131.Hardwood floor 状态压缩DP
#include #include typedef __int64 LL; LL dp[10][1<<10]; int n, m; int st, flag; void dfs(int i, int s, int ns, int j, LL num) { if(j == m) { dp[i+1][ns] += num; return; } if((s&(1<<j)) == 0)...
分类:其他好文   时间:2015-03-02 14:51:37    阅读次数:115
SGU 495 Kids and Prizes 概率dp
题意: 有N个箱子放有礼物,M个人依次取。如果取到的箱子有礼物,则拿走礼物。无论有没有拿到礼物,都将箱子原状放回。(所以就有可能后面的人拿到前面的人拿过的箱子,然后就没得到奖品)。问,最后能拿走的礼物数量的期望。 两种思路,给跪了,,,还是没有想出来。。。。 m个人是独立的。 对于每个礼物不被人选中的概率为((n-1)/n)^m 那么不被选中的礼物数的期望就是 n*((n-1)/n)^m...
分类:其他好文   时间:2015-02-26 01:23:18    阅读次数:207
SGU[118] Digital Root
Description描述Let f(n) be a sum of digits for positive integer n. If f(n) is one-digit number then it is a digital root for n and otherwise digital roo...
分类:其他好文   时间:2015-02-24 16:20:33    阅读次数:180
SGU[117] Counting
Description描述Find amount of numbers for given sequence of integer numbers such that after raising them to theM-th power they will be divided byK.求出给定一...
分类:其他好文   时间:2015-02-24 15:02:35    阅读次数:149
SGU[104] Little shop of flowers
Description描述You want to arrange the window of your flower shop in a most pleasant way. You haveFbunches of flowers, each being of a different kind, a...
分类:其他好文   时间:2015-02-24 13:47:45    阅读次数:230
SGU[101] Domino
Description描述Dominoes – game played with small, rectangular blocks of wood or other material, each identified by a number of dots, or pips, on its fac...
分类:其他好文   时间:2015-02-22 15:46:50    阅读次数:172
SGU[347] Join the Strings
Description描述His Royal Highness King of Berland Berl XV was a very wise man and had a very accomplished wife, who was aware of the fact, that prominen...
分类:其他好文   时间:2015-02-22 13:27:23    阅读次数:171
SGU[151] Construct a triangle
Description描述Find coordinates of any triangle ABC if it is know that |AB|=c, |AC|=b, |AM|=m, AM is a median of triangle.找到任何一个三角形ABC,使得它满足|AB| = c,|AC...
分类:其他好文   时间:2015-02-22 13:20:04    阅读次数:140
SGU 116 Index of super-prime 数论+完全背包+输出方案
第一次写背包问题的【输出方案】
分类:其他好文   时间:2015-02-19 22:59:54    阅读次数:374
451条   上一页 1 ... 26 27 28 29 30 ... 46 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!