锘??xml version="1.0" encoding="utf-8" standalone="yes"?>高清免费久久午夜精品,久久精品亚洲欧美日韩久久,国产美女久久久 http://m.shnenglu.com/Dreams/archive/2009/04/25/81020.htmlDreamSky DreamSky Sat, 25 Apr 2009 02:59:00 GMT http://m.shnenglu.com/Dreams/archive/2009/04/25/81020.html http://m.shnenglu.com/Dreams/comments/81020.html http://m.shnenglu.com/Dreams/archive/2009/04/25/81020.html#Feedback 2 http://m.shnenglu.com/Dreams/comments/commentRss/81020.html http://m.shnenglu.com/Dreams/services/trackbacks/81020.html http://acm.hdu.edu.cn/showproblem.php?pid=2152
// 1307251 2009-04-25 10:56:01 Accepted 2152 0MS 260K 527 B C++ no way #include < iostream > using namespace std; int main() { int n,M; while (cin >> n >> M) { int i,j,k; int most[ 101 ],least[ 101 ],num[ 101 ],temp[ 101 ]; for (i = 1 ;i <= n;i ++ ) cin >> least[i] >> most[i]; for (i = 0 ;i <= M;i ++ ) temp[i] = num[i] = 0 ; num[ 0 ] = 1 ; for (i = 1 ;i <= n;i ++ ) { for (j = 0 ;j <= M;j ++ ) { for (k = least[i];k <= most[i] && k + j <= M;k ++ ) temp[j + k] += num[j]; } for (j = 0 ;j <= M;j ++ ) { num[j] = temp[j]; temp[j] = 0 ; } } cout<< num[M] << endl; } return 0 ; }
]]> hdu 2069 Coin Change http://m.shnenglu.com/Dreams/archive/2009/04/25/81017.htmlDreamSky DreamSky Sat, 25 Apr 2009 02:33:00 GMT http://m.shnenglu.com/Dreams/archive/2009/04/25/81017.html http://m.shnenglu.com/Dreams/comments/81017.html http://m.shnenglu.com/Dreams/archive/2009/04/25/81017.html#Feedback 0 http://m.shnenglu.com/Dreams/comments/commentRss/81017.html http://m.shnenglu.com/Dreams/services/trackbacks/81017.html http://acm.hdu.edu.cn/showproblem.php?pid=2069
// 1307156 2009-04-25 10:29:15 Accepted 2069 15MS 464K 678 B C++ no way #include < iostream > using namespace std; int main() { int i,j,k,t; int nums[ 251 ] = { 0 } ,coins[ 5 ] = { 1 , 5 , 10 , 25 , 50 } ; int ans[ 251 ][ 101 ] = { 0 } ,ansTemp[ 251 ][ 101 ] = { 0 } ; // …[i][j]琛ㄧずi鍒嗛挶鐢眏涓‖甯佺粍鎴愮殑鏂規鏁?/span> ans[ 0 ][ 0 ] = 1 ; for (i = 1 ;i <= 5 ;i ++ ) { for (j = 0 ;j <= 250 ;j ++ ) for (k = 0 ;k * coins[i - 1 ] + j <= 250 ;k ++ ) for (t = 0 ;t + k < 101 ;t ++ ) // 鎬葷殑紜竵鏁拌灝戜簬100 ansTemp[k * coins[i - 1 ] + j][t + k] += ans[j][t]; for (j = 0 ;j <= 250 ;j ++ ) for (t = 0 ;t < 101 ;t ++ ) { ans[j][t] = ansTemp[j][t]; ansTemp[j][t] = 0 ; } } for (i = 1 ;i <= 250 ;i ++ ) for (j = 1 ;j <= 100 ;j ++ ) nums[i] += ans[i][j]; nums[ 0 ] = 1 ; while (cin >> i) cout << nums[i] << endl; return 0 ; }
]]> hdu 1709 The Balance http://m.shnenglu.com/Dreams/archive/2009/04/25/81011.htmlDreamSky DreamSky Sat, 25 Apr 2009 01:18:00 GMT http://m.shnenglu.com/Dreams/archive/2009/04/25/81011.html http://m.shnenglu.com/Dreams/comments/81011.html http://m.shnenglu.com/Dreams/archive/2009/04/25/81011.html#Feedback 0 http://m.shnenglu.com/Dreams/comments/commentRss/81011.html http://m.shnenglu.com/Dreams/services/trackbacks/81011.html http://acm.hdu.edu.cn/showproblem.php?pid=1709
// 1306899 2009-04-25 09:13:59 Accepted 1709 78MS 336K 805 B C++ no way #include < iostream > #include< cmath > using namespace std; int main() { int n; while (cin >> n && n > 0 ) { int i,j,k,N = 0 ; int w[ 101 ],temp[ 10001 ],outs[ 10001 ]; for (i = 1 ;i <= n;i ++ ) { scanf( " %d " , & w[i]); N += w[i]; } for (i = 0 ;i <= N;i ++ ) temp[i] = outs[i] = 0 ; outs[ 0 ] = 1 ; outs[w[ 1 ]] = 1 ; for (i = 2 ;i <= n;i ++ ) { for (j = 0 ;j <= N;j ++ ) { if (outs[j] == 1 ) { temp[j] = 1 ; // 鏍囧織j鍑虹幇榪?/span> temp[j + w[i]] = 1 ; // 鍔犱竴涓?/span> temp[abs(j - w[i])] = 1 ; // 鍑忎竴涓?/span> } } for (j = 0 ;j <= N;j ++ ) { outs[j] = temp[j]; temp[j] = 0 ; } } k = 0 ; for (i = 1 ;i <= N;i ++ ) if (outs[i] == 0 ) temp[k ++ ] = i; printf( " %d\n " ,k); if (k > 0 ) { printf( " %d " ,temp[ 0 ]); for (i = 1 ;i < k;i ++ ) printf( " %d " ,temp[i]); printf( " \n " ); } } return 0 ; }
]]> hdu 1171 Big Event in HDU http://m.shnenglu.com/Dreams/archive/2009/04/24/80973.htmlDreamSky DreamSky Fri, 24 Apr 2009 10:11:00 GMT http://m.shnenglu.com/Dreams/archive/2009/04/24/80973.html http://m.shnenglu.com/Dreams/comments/80973.html http://m.shnenglu.com/Dreams/archive/2009/04/24/80973.html#Feedback 1 http://m.shnenglu.com/Dreams/comments/commentRss/80973.html http://m.shnenglu.com/Dreams/services/trackbacks/80973.html http://acm.hdu.edu.cn/showproblem.php?pid=1171
// 1305008 2009-04-24 17:36:03 Accepted 1171 2015MS 1260K 838 B C++ no way // 1305033 2009-04-24 17:42:02 Accepted 1171 796MS 760K 664 B C++ no way #include < iostream > #include< cmath > using namespace std; int outs[ 250002 ]; int main() { int n; while (cin >> n && n >= 0 ) // A test case starting with a negative integer terminates input // and this test case is not to be processed 榪欏彞璇濊鎴戦敊浜嗗緢澶氭 錛屽煎緱娉ㄦ剰 { int i,j,k,s,N = 0 ,t; int w[ 51 ],num[ 51 ]; for (i = 1 ;i <= n;i ++ ) { scanf( " %d%d " , & w[i], & num[i]); N += w[i] * num[i]; } t = N / 2 ; // 鍙栧叾涓鍗?/span> for (i = 0 ;i <= N;i ++ ) outs[i] = 0 ; for (i = 0 ;i <= num[ 1 ];i ++ ) outs[i * w[ 1 ]] = 1 ; for (i = 2 ;i <= n;i ++ ) { for (j = 0 ;j <= t;j ++ ) { for (k = 0 ,s = 0 ;s <= num[i] && k + j <= t; k += w[i],s ++ ) if ( outs[j] == 1 ) outs[k + j] = 1 ; } } for (i = t; i >= 0 ;i -- ) if (outs[i] != 0 ) break ; printf( " %d %d\n " ,i + N - 2 * i ,i); } return 0 ; }
]]> hdu 1085 Holding Bin-Laden Captive! http://m.shnenglu.com/Dreams/archive/2009/04/24/80956.htmlDreamSky DreamSky Fri, 24 Apr 2009 08:42:00 GMT http://m.shnenglu.com/Dreams/archive/2009/04/24/80956.html http://m.shnenglu.com/Dreams/comments/80956.html http://m.shnenglu.com/Dreams/archive/2009/04/24/80956.html#Feedback 3 http://m.shnenglu.com/Dreams/comments/commentRss/80956.html http://m.shnenglu.com/Dreams/services/trackbacks/80956.html http://acm.hdu.edu.cn/showproblem.php?pid=1085
// 1304713 2009-04-24 16:34:31 Accepted 1085 156MS 324K 728 B C++ no way #include < iostream > using namespace std; int main() { int num[ 3 ]; int t[ 3 ] = { 1 , 2 , 5 } ; while (cin >> num[ 0 ] >> num[ 1 ] >> num[ 2 ]) { if (num[ 0 ] == 0 && num[ 1 ] == 0 && num[ 2 ] == 0 ) break ; int outs[ 8005 ],temp[ 8005 ],i,j,k,s,N = 0 ; for (i = 0 ;i < 3 ;i ++ ) N += t[i] * num[i]; for (i = 0 ;i <= N + 1 ;i ++ ) outs[i] = temp[i] = 0 ; for (i = 0 ;i <= num[ 0 ];i ++ ) // 涓瀹氳鏈夊簳灞?/span> outs[i] = 1 ; for (i = 1 ;i <= 2 ;i ++ ) // { for (j = 0 ;j <= N;j ++ ) { if(outs[j] == 0) continue; for (k = 0 ,s = 0 ; k + j <= N && s <= num[i] ;s ++ , k += t[i]) // 娉ㄦ剰涓暟鐨勬帶鍒秪 { temp[k + j] += outs[j]; } } for (j = 0 ;j <= N;j ++ ) { outs[j] = temp[j]; temp[j] = 0 ; } } for (i = 1 ;i <= N + 1 ;i ++ ) if (outs[i] == 0 ) break ; cout << i << endl; } return 0 ; }
]]> hdu 1028 Ignatius and the Princess III http://m.shnenglu.com/Dreams/archive/2009/04/24/80944.htmlDreamSky DreamSky Fri, 24 Apr 2009 06:55:00 GMT http://m.shnenglu.com/Dreams/archive/2009/04/24/80944.html http://m.shnenglu.com/Dreams/comments/80944.html http://m.shnenglu.com/Dreams/archive/2009/04/24/80944.html#Feedback 0 http://m.shnenglu.com/Dreams/comments/commentRss/80944.html http://m.shnenglu.com/Dreams/services/trackbacks/80944.html http://acm.hdu.edu.cn/showproblem.php?pid=1028
// 1304357 2009-04-24 14:49:41 Accepted 1028 15MS 260K 526 B C++ no way #include < iostream > using namespace std; int main() { int i,j,k,n; while (cin >> n) { int temp[ 121 ],outs[ 121 ]; for (i = 0 ; i <= n; i ++ ) // 鍙湁1鐨勬椂鍊?/span> { outs[i] = 1 ; temp[i] = 0 ; } for (i = 2 ;i <= n;i ++ ) { for (j = 0 ;j <= n;j ++ ) { for (k = 0 ;k + j <= n;k += i) { temp[k + j] += outs[j]; } } for (j = 0 ;j <= n;j ++ ) { outs[j] = temp[j]; temp[j] = 0 ; } } cout<< outs[n] << endl; } return 0 ; }
]]> hdu 1398 Square Coins http://m.shnenglu.com/Dreams/archive/2009/04/24/80937.htmlDreamSky DreamSky Fri, 24 Apr 2009 06:23:00 GMT http://m.shnenglu.com/Dreams/archive/2009/04/24/80937.html http://m.shnenglu.com/Dreams/comments/80937.html http://m.shnenglu.com/Dreams/archive/2009/04/24/80937.html#Feedback 0 http://m.shnenglu.com/Dreams/comments/commentRss/80937.html http://m.shnenglu.com/Dreams/services/trackbacks/80937.html http://acm.hdu.edu.cn/showproblem.php?pid=1398
// 1304230 2009-04-24 14:13:00 Accepted 1398 0MS 260K 523 B C++ no way #include < iostream > using namespace std; int main() { int squares[ 17 ] = { 1 , 4 , 9 , 16 , 25 , 36 , 49 , 64 , 81 , 100 , 121 , 144 , 169 , 196 , 225 , 256 , 289 } ; // 鎵鏈夌‖甯佺殑縐嶇被鍙婇潰鍊?/span> int i,j,k; int num[ 301 ],temp[ 301 ]; for (i = 0 ;i <= 300 ;i ++ ) { num[i] = 1 ; temp[i] = 0 ; } for (i = 2 ; i <= 17 ; i ++ ) { for (j = 0 ;j <= 300 ;j ++ ) { for (k = 0 ; k + j <= 300 ; k += squares[i - 1 ]) { temp[j + k] += num[j]; } } for (j = 0 ;j <= 300 ;j ++ ) { num[j] = temp[j]; temp[j] = 0 ; } } while (cin >> k && k) { cout << num[k] << endl; } return 0 ; }
]]>
日产精品99久久久久久 |
亚洲精品高清国产一久久 |
久久精品这里热有精品 |
亚洲欧美日韩久久精品第一区 |
99久久精品费精品国产 |
九九精品99久久久香蕉 |
久久狠狠爱亚洲综合影院
|
无码专区久久综合久中文字幕 |
久久国产免费直播 |
麻豆精品久久久一区二区 |
久久精品无码一区二区三区免费 |
久久久久亚洲av毛片大
|
久久久国产视频 |
熟妇人妻久久中文字幕 |
91精品观看91久久久久久 |
日韩美女18网站久久精品 |
人妻无码中文久久久久专区 |
99久久免费国产精精品 |
色狠狠久久综合网 |
91精品国产综合久久香蕉 |
久久精品国产免费观看三人同眠 |
欧美久久综合性欧美 |
午夜精品久久久久久影视riav |
99久久精品国产免看国产一区 |
久久频这里精品99香蕉久 |
久久99国产精品久久99 |
亚洲综合伊人久久大杳蕉 |
久久精品国产精品亚洲 |
97久久国产亚洲精品超碰热 |
久久人人青草97香蕉 |
久久亚洲国产成人影院网站 |
久久99国产精品久久99果冻传媒
|
青青青青久久精品国产
|
国产香蕉97碰碰久久人人 |
久久成人国产精品 |
久久无码AV中文出轨人妻 |
久久精品亚洲精品国产欧美 |
久久91精品久久91综合 |
国产精品99久久99久久久 |
久久青青草原亚洲av无码app |
国内精品人妻无码久久久影院导航 |