锘??xml version="1.0" encoding="utf-8" standalone="yes"?>久久久久久国产精品免费免费,国产精品亚洲综合久久,欧美日韩精品久久久久 http://www.shnenglu.com/cisjiong/Always online zh-cn Mon, 12 May 2025 01:24:05 GMT Mon, 12 May 2025 01:24:05 GMT 60 END http://www.shnenglu.com/cisjiong/archive/2010/12/04/135469.htmlCisJiong CisJiong Sat, 04 Dec 2010 12:31:00 GMT http://www.shnenglu.com/cisjiong/archive/2010/12/04/135469.html http://www.shnenglu.com/cisjiong/comments/135469.html http://www.shnenglu.com/cisjiong/archive/2010/12/04/135469.html#Feedback 0 http://www.shnenglu.com/cisjiong/comments/commentRss/135469.html http://www.shnenglu.com/cisjiong/services/trackbacks/135469.html END. IF YOU LOVE ACM,JUST DO IT WHATEVER OTHER SAY.
]]>KM妯℃澘 http://www.shnenglu.com/cisjiong/archive/2010/06/26/118771.htmlCisJiong CisJiong Sat, 26 Jun 2010 05:39:00 GMT http://www.shnenglu.com/cisjiong/archive/2010/06/26/118771.html http://www.shnenglu.com/cisjiong/comments/118771.html http://www.shnenglu.com/cisjiong/archive/2010/06/26/118771.html#Feedback 1 http://www.shnenglu.com/cisjiong/comments/commentRss/118771.html http://www.shnenglu.com/cisjiong/services/trackbacks/118771.html 闃呰鍏ㄦ枃 ]]> FOJ1919 K-way Merging sort(java+dfs+map) http://www.shnenglu.com/cisjiong/archive/2010/06/04/117147.htmlCisJiong CisJiong Thu, 03 Jun 2010 16:55:00 GMT http://www.shnenglu.com/cisjiong/archive/2010/06/04/117147.html http://www.shnenglu.com/cisjiong/comments/117147.html http://www.shnenglu.com/cisjiong/archive/2010/06/04/117147.html#Feedback 0 http://www.shnenglu.com/cisjiong/comments/commentRss/117147.html http://www.shnenglu.com/cisjiong/services/trackbacks/117147.html http://acm.fzu.edu.cn/problem.php?pid=1919 澶ф剰灝辨槸姹傞鐩墍瀹氫箟鐨凨鍚堝茍鎺掑簭闇瑕佷氦鎹㈢殑嬈℃暟銆?br>璁板繂鍖栨悳绱?br>
1銆乶<k,瑕佺敤(n-1)*n/2姣旇緝 2銆乶≥k鏃訛紝n鍒嗘垚k鍫嗭紝鏈塶%k鍫嗙殑f(n/k+1,k) 3銆佹湁k-n%k鍫嗙殑f(n/k,k)錛? 4銆乲鍫嗗悎騫舵椂錛屾渶澶ф瘮杈冩鏁頒負錛氭瘡嬈″彇鏈灝忓奸兘鏄k鍫嗘瘮杈冨彇鏈灝忥紝鐢╧-1嬈★紝鎬葷殑涓?k-1)*(n-k+1) 5銆佹渶鍚庡墿涓媖-1鍫嗗惈涓涓厓绱犵殑鍫嗭紝鐢?k-1)*(k-2)/2嬈℃瘮杈冦?
java HashMap銆?br>鏂板緩HashMap錛歁ap<BigInteger,BigInteger> map=new HashMap<BigInteger,BigInteger>(); 鎻掑叆閿鹼細map.put(n,tmp) 鏌ユ壘閿槸鍚﹀瓨鍦細map.containsKey(n)錛岃繑鍥瀊oolean鍨嬨?br>榪斿洖閿鹼細map.get(n) Java Map鎺ュ彛鎵╁睍錛?br>http://www.javaeye.com/topic/421014
]]> 鍒ゆ柇鏁存暟闆嗗悎S鏄惁瀛樺湪鏈変袱涓叾鍜岀瓑浜庢寚瀹氬紉鐨勫厓绱?/title> http://www.shnenglu.com/cisjiong/archive/2010/05/30/116764.htmlCisJiong CisJiong Sun, 30 May 2010 14:42:00 GMT http://www.shnenglu.com/cisjiong/archive/2010/05/30/116764.html http://www.shnenglu.com/cisjiong/comments/116764.html http://www.shnenglu.com/cisjiong/archive/2010/05/30/116764.html#Feedback 0 http://www.shnenglu.com/cisjiong/comments/commentRss/116764.html http://www.shnenglu.com/cisjiong/services/trackbacks/116764.html 綆楁硶瀵艱2.3-7錛?br>棰樼洰灝辨槸鏍囬錛岃姹傚湪nlgn鍐呭畬鎴愩備粠csdn涓婃壘鍒扮瓟妗堬細 鍏堟帓搴忥紝鐒跺悗姣旇緝錛?/p>
int i = 0 ,j = n - 1 ; int b = 0 ; while (i < j) { int k = s[i] + s[j]; if (k == x) b = 1 , break ; else if (k < x) i ++ ; else j -- ; } if (b) printf( " Y\n " ); else printf( " N\n " );
nlgn+n=nlgn,鍗沖彲浠ュ湪瑙勫畾鏃墮棿鍐呭畬鎴愩?br> 鍚屾牱閬撶悊錛屾壘涓変釜鏁頒箣鍜屼篃鍙互鍦╪^2鏃墮棿鍐呭畬鎴愩?br>sum=a[i]+b[i]+c[i]; 絳変環鎵句袱涓暟鍏跺拰涓簊=sum-a[i]; 鍏辨湁n涓紝姣忎釜鏌ユ壘涓虹嚎鎬ф椂闂磏錛?br>nlgn+n^2=n^2銆? FOJ 1707 絳夊紡鏁伴噺http://acm.fzu.edu.cn/problem.php?pid=1707
]]> FOJ1914 Funny Positive Sequence http://www.shnenglu.com/cisjiong/archive/2010/05/30/116725.htmlCisJiong CisJiong Sun, 30 May 2010 02:13:00 GMT http://www.shnenglu.com/cisjiong/archive/2010/05/30/116725.html http://www.shnenglu.com/cisjiong/comments/116725.html http://www.shnenglu.com/cisjiong/archive/2010/05/30/116725.html#Feedback 1 http://www.shnenglu.com/cisjiong/comments/commentRss/116725.html http://www.shnenglu.com/cisjiong/services/trackbacks/116725.html http://acm.fzu.edu.cn/problem.php?pid=1914 棰樼洰澶ф剰: 灝辨槸緇欏嚭涓涓簭鍒楋紝灝嗗畠寰幆宸︾Щn嬈″彲浠ュ緱鍒皀涓笉鍚岀殑搴忓垪錛?br>姹傝繖n涓簭鍒椾腑鑳藉鐢熸垚棰樼洰鎵瀹氫箟鐨勫簭鍒椾釜鏁般?br> 鍙互鍏堢畻鍑轟笉婊¤凍鏉′歡鐨勫簭鍒楋紝鐩稿噺鍗沖彲銆?br>涓嶆弧瓚崇殑搴忓垪鑲畾鏄洜涓虹敱闈炴鏁扮殑瀛樺湪錛屾墍浠ュ姣忎釜闈炴鏁幫紝鍚戝墠鎼滅儲騫剁瘡鍔犵洿鍒板拰澶т簬0錛?br>鍒欎互榪欎釜鍖洪棿鍐呮墍鏈夋暟寮濮嬬殑搴忓垪鍧囦笉婊¤凍鏉′歡銆?br>
]]> PKU1837 Balance(DP) http://www.shnenglu.com/cisjiong/archive/2010/05/28/116631.htmlCisJiong CisJiong Fri, 28 May 2010 09:53:00 GMT http://www.shnenglu.com/cisjiong/archive/2010/05/28/116631.html http://www.shnenglu.com/cisjiong/comments/116631.html http://www.shnenglu.com/cisjiong/archive/2010/05/28/116631.html#Feedback 0 http://www.shnenglu.com/cisjiong/comments/commentRss/116631.html http://www.shnenglu.com/cisjiong/services/trackbacks/116631.html http://acm.pku.edu.cn/JudgeOnline/problem?id=1837 緇欏嚭涓涓О鎵鏈夐挬瀛愪綅緗紙鏁扮粍pos瀛橈級錛屼竴浜涚牆鐮佺殑閲嶉噺錛堟暟緇剋瀛橈級錛屾眰鍏ㄩ儴鐮濈爜瑕佷嬌鐢ㄥ茍浣跨О騫寵 鐨勬斁娉曟繪暟銆?br>鍔涚煩=鍔?璺濈 鐢╠p[i][k]琛ㄧず鍓峣縐嶇牆鐮佷駭鐢熷姏鐭╀負k鐨勬斁娉曪紝鑰冭檻絎琲+1縐嶇牆鐮侊紝鏈塪p[i+1][k+w[i]*pos[j]]=sigma(dp[i][k])銆?br>涓夐噸寰幆絀蜂婦錛屾渶鍚庤緭鍑篸p[n][0]鍗沖彲銆?br>鍔ㄦ佽鍒掞紝鐪熺殑寰堢濂囷紒
]]> POJ1094 Sorting It All Out(鎷撴墤鎺掑簭) http://www.shnenglu.com/cisjiong/archive/2010/05/22/116138.htmlCisJiong CisJiong Sat, 22 May 2010 15:16:00 GMT http://www.shnenglu.com/cisjiong/archive/2010/05/22/116138.html http://www.shnenglu.com/cisjiong/comments/116138.html http://www.shnenglu.com/cisjiong/archive/2010/05/22/116138.html#Feedback 0 http://www.shnenglu.com/cisjiong/comments/commentRss/116138.html http://www.shnenglu.com/cisjiong/services/trackbacks/116138.html http://acm.pku.edu.cn/JudgeOnline/problem?id=1094 鎷撴墤鎺掑簭錛岃兘紜畾欏哄簭鐨勬儏鍐墊槸鍦ㄦ嫇鎵戞帓搴忔椂姣忎釜鏃跺埢鍏ュ害涓?鐨勯《鐐瑰彧鏈変竴涓?br>
#include < iostream > #include< fstream > using namespace std; int n,degree[ 30 ],res[ 30 ]; struct Node { int pos; Node * next; } node[ 30 ]; void insert( char a, char b) { int aa = a - ' A ' ; int bb = b - ' A ' ; Node * p = new Node; p -> pos = bb; p -> next = node[aa].next; node[aa].next = p; } int top_sort() { bool flag = false ; int in [ 30 ] = { 0 } ; int i,tmp,top,sta[ 100 ]; for (i = 0 ,top = 0 ;i < n;i ++ ) { in [i] = degree[i]; if ( in [i] == 0 ) sta[top ++ ] = i; } if (top > 1 ) flag = true ; /**/ /* for(i=0;i<n;i++) printf("%d ",in[i]); puts(""); */ for (i = 0 ;i < n;i ++ ) { if (top == 0 ) return - 1 ; if (top > 1 ) flag = true ; tmp = sta[ -- top]; res[i] = tmp; Node * p = node[tmp].next; while (p) { if ( -- in [p -> pos] == 0 ) sta[top ++ ] = p -> pos; p = p -> next; } } if (flag) return 0 ; return 1 ; } int main() { bool flag,incon; int i,m,num = 0 ,tmp; char str[ 4 ]; ifstream input; input.open( " in.txt " ); // while(input>>n>>m) while (scanf( " %d%d " , & n, & m)) { if (n == 0 && m == 0 ) break ; flag = incon = false ; memset(degree, 0 , sizeof (degree)); for (i = 0 ;i < n;i ++ ) node[i].next = NULL; for (i = 1 ;i <= m;i ++ ) { scanf( " %s " ,str); // input>>str; if (( ! flag) && ( ! incon)) { degree[str[ 2 ] - ' A ' ] ++ ; insert(str[ 0 ],str[ 2 ]); tmp = top_sort(); if (tmp ==- 1 ) { num = i; incon = true ; } else if (tmp == 1 ) { num = i; flag = true ; } } } if (flag) { printf( " Sorted sequence determined after %d relations: " ,num); for (i = 0 ;i < n;i ++ ) printf( " %c " , ' A ' + res[i]); puts( " . " ); } else if (incon) printf( " Inconsistency found after %d relations.\n " ,num); else printf( " Sorted sequence cannot be determined.\n " ); } system(" pause " ); return 0 ; }
]]> FOJ1084 Three powers(楂樼簿搴? http://www.shnenglu.com/cisjiong/archive/2010/05/11/115133.htmlCisJiong CisJiong Tue, 11 May 2010 12:53:00 GMT http://www.shnenglu.com/cisjiong/archive/2010/05/11/115133.html http://www.shnenglu.com/cisjiong/comments/115133.html http://www.shnenglu.com/cisjiong/archive/2010/05/11/115133.html#Feedback 0 http://www.shnenglu.com/cisjiong/comments/commentRss/115133.html http://www.shnenglu.com/cisjiong/services/trackbacks/115133.html http://acm.fzu.edu.cn/problem.php?pid=1084 a[n]>S a[i](i<n), f[n]=f[n-1]*2鍓峮涓暟鍏辨湁2^n縐?鐒跺悗java鍗沖彲(NetBeans,璧?)
import java.util. * ; import java.math.BigInteger; public class Main { public static void main(String[] args) { Scanner cin = new Scanner(System.in); BigInteger num; int [] res = new int [ 100 ]; int len; while (cin.hasNextBigInteger()) { num = cin.nextBigInteger(); if (num.signum() == 0 ) break ; num = num.subtract(BigInteger.valueOf( 1 )); if (num.signum() == 0 ) { System.out.println( " { } " ); continue ; } len= 0 ; while (num.bitLength() > 0 ) { res[len ++ ] = num.bitLength(); num = num.clearBit(res[len - 1 ] - 1 ); } System.out.print(" { " ); for ( int i = len - 1 ;i > 0 ;i -- ) System.out.print( " " + BigInteger.valueOf( 3 ).pow(res[i] - 1 ) + " , " ); System.out.println( " " + BigInteger.valueOf( 3 ).pow(res[ 0 ] - 1 ) + " } " ); } } }
]]> FOJ1492 鍦伴渿棰勬祴 http://www.shnenglu.com/cisjiong/archive/2010/05/09/114890.htmlCisJiong CisJiong Sat, 08 May 2010 17:07:00 GMT http://www.shnenglu.com/cisjiong/archive/2010/05/09/114890.html http://www.shnenglu.com/cisjiong/comments/114890.html http://www.shnenglu.com/cisjiong/archive/2010/05/09/114890.html#Feedback 0 http://www.shnenglu.com/cisjiong/comments/commentRss/114890.html http://www.shnenglu.com/cisjiong/services/trackbacks/114890.html http://acm.fzu.edu.cn/problem.php?pid=1492 TLE浜嗗緢澶氾紝浠ュ墠鍚戝埆浜鴻浜嗕唬鐮佺湅涓嶆噦錛屼粖鏅氶噸鍋氾紝涓嬈C銆備富瑕佹濇兂鏄褰曟帓搴忓悗鐩擱偦鐨勫厓绱犲茍鍙婃椂鏇存柊銆?/p>
#include < iostream > #include< cmath > #include< algorithm > using namespace std; struct Node { int pos,val; bool operator < ( const Node & a) const { return val < a.val; } }node[ 100001 ]; int pos[ 100001 ],alloc[ 100001 ][ 2 ]; // pos 鍘熸潵鍏冪礌錛?-n)鍦ㄦ帓搴忓悗鐨勪綅緗紝alloc鎺掑簭鍚庣浉閭誨厓绱犲湪鍘熷簭鍒楃殑浣嶇疆 inline int min( int a, int b) { return a > b ? b : a; } int main() { int i,n,res,t1,t2; while (scanf( " %d " , & n) != EOF) { for (i = 1 ;i <= n;i ++ ) { scanf( " %d " , & node[i].val); node[i].pos = i; } sort(node+ 1 ,node + n + 1 ); node[ 0 ].pos = 0 ,node[ 0 ].val = 100000000 ; node[n + 1 ].pos = n + 1 ,node[n + 1 ].val = 100000000 ; pos[ 0 ] = 0 ,pos[n + 1 ] = n + 1 ; for (i = 1 ;i <= n;i ++ ) { pos[node[i].pos] = i; alloc[node[i].pos][ 0 ] = node[i - 1 ].pos; alloc[node[i].pos][ 1 ] = node[i + 1 ].pos; } res= node[pos[n]].val; for (i = 1 ;i < n;i ++ ) { t1 = abs(node[pos[i]].val - node[pos[alloc[i][ 0 ]]].val); t2 = abs(node[pos[i]].val - node[pos[alloc[i][ 1 ]]].val); res += min(t1,t2); alloc[alloc[i][ 0 ]][ 1 ] = alloc[i][ 1 ]; alloc[alloc[i][ 1 ]][ 0 ] = alloc[i][ 0 ]; } printf(" %d\n " ,res); } return 0 ; }
]]>POJ1032 Parliament錛團OJ 1698銆丗OJ1823錛?/title> http://www.shnenglu.com/cisjiong/archive/2010/05/01/114146.htmlCisJiong CisJiong Sat, 01 May 2010 13:58:00 GMT http://www.shnenglu.com/cisjiong/archive/2010/05/01/114146.html http://www.shnenglu.com/cisjiong/comments/114146.html http://www.shnenglu.com/cisjiong/archive/2010/05/01/114146.html#Feedback 0 http://www.shnenglu.com/cisjiong/comments/commentRss/114146.html http://www.shnenglu.com/cisjiong/services/trackbacks/114146.html 闃呰鍏ㄦ枃 ]]>
久久中文字幕一区二区 |
久久精品国产亚洲AV忘忧草18 |
久久久久亚洲精品无码蜜桃 |
久久婷婷激情综合色综合俺也去 |
久久精品国产亚洲AV无码娇色 |
国产精品无码久久综合网 |
久久这里有精品视频 |
精品综合久久久久久97 |
美女写真久久影院 |
中文成人久久久久影院免费观看 |
少妇高潮惨叫久久久久久 |
99久久成人18免费网站 |
性做久久久久久久 |
久久久久99精品成人片三人毛片 |
亚洲精品乱码久久久久66 |
色综合久久久久 |
国产亚洲精品自在久久 |
三级片免费观看久久 |
9191精品国产免费久久 |
久久久噜噜噜久久中文福利 |
青青草原综合久久大伊人导航 |
色综合久久最新中文字幕 |
久久婷婷国产综合精品 |
一级女性全黄久久生活片免费 |
国产精品久久毛片完整版 |
亚洲国产精品久久久天堂 |
久久久久国产精品麻豆AR影院 |
WWW婷婷AV久久久影片 |
狼狼综合久久久久综合网 |
伊人精品久久久久7777 |
久久乐国产精品亚洲综合 |
99热都是精品久久久久久 |
国产精品久久久久久影院 |
国内精品久久久久影院日本 |
无码国产69精品久久久久网站 |
亚洲国产成人精品91久久久 |
久久久久亚洲AV成人网人人网站
|
精品久久久久久久久中文字幕 |
香蕉久久久久久狠狠色 |
亚洲人成无码久久电影网站 |
99久久免费国产精品特黄 |