锘??xml version="1.0" encoding="utf-8" standalone="yes"?>色综合久久中文字幕综合网,久久精品国产乱子伦,亚洲а∨天堂久久精品9966http://www.shnenglu.com/Darren/C++ 鍙婄畻娉?/description>zh-cnWed, 07 May 2025 01:15:45 GMTWed, 07 May 2025 01:15:45 GMT60鎹釜鍗氬錛岄噸鏂板紑濮嬪涔犮傘傘?/title><link>http://www.shnenglu.com/Darren/archive/2010/04/30/114008.html</link><dc:creator>Darren</dc:creator><author>Darren</author><pubDate>Thu, 29 Apr 2010 16:52:00 GMT</pubDate><guid>http://www.shnenglu.com/Darren/archive/2010/04/30/114008.html</guid><wfw:comment>http://www.shnenglu.com/Darren/comments/114008.html</wfw:comment><comments>http://www.shnenglu.com/Darren/archive/2010/04/30/114008.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/Darren/comments/commentRss/114008.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/Darren/services/trackbacks/114008.html</trackback:ping><description><![CDATA[鏂板崥瀹㈠湴鍧: <a >http://dnizna.javaeye.com/</a><br><img src ="http://www.shnenglu.com/Darren/aggbug/114008.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/Darren/" target="_blank">Darren</a> 2010-04-30 00:52 <a href="http://www.shnenglu.com/Darren/archive/2010/04/30/114008.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>pku 1691 Painting A Board 鐘舵佸帇緙〥Phttp://www.shnenglu.com/Darren/archive/2009/10/08/98083.htmlDarrenDarrenThu, 08 Oct 2009 06:54:00 GMThttp://www.shnenglu.com/Darren/archive/2009/10/08/98083.htmlhttp://www.shnenglu.com/Darren/comments/98083.htmlhttp://www.shnenglu.com/Darren/archive/2009/10/08/98083.html#Feedback0http://www.shnenglu.com/Darren/comments/commentRss/98083.htmlhttp://www.shnenglu.com/Darren/services/trackbacks/98083.html

#include聽 < stdio.h >
#include聽
< stdlib.h >
#include聽
< string .h >

int const 聽inf = 1 << 29 ;
int 聽n;
struct 聽Point {
聽聽聽聽
int 聽Lx,聽Ly,聽Rx,聽Ry;
}
;

Point聽pnt[
16 ];
int 聽聽need[ 16 ],聽dp[ 1 << 15 ][ 15 ],聽color[ 16 ];

void 聽init() {
聽聽聽聽
for (聽 int 聽i = 0 ;聽i <= 聽n;聽 ++ i聽)聽need[i] = 0 ;
聽聽聽聽
聽聽聽聽
for (聽 int 聽i = 0 ;聽i < 聽n;聽 ++ i聽) {
聽聽聽聽聽聽聽聽
for ( int 聽j = 0 ;聽j < 聽n;聽 ++ j聽) {
聽聽聽聽聽聽聽聽聽聽聽聽
if (聽i == 聽j聽)聽 continue ;

聽聽聽聽聽聽聽聽聽聽聽聽
if (聽pnt[j].Ry <= 聽pnt[i].Ly聽 && 聽pnt[j].Lx < 聽pnt[i].Rx聽) {
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽need[i]
|= 聽( 1 << j);
聽聽聽聽聽聽聽聽聽聽聽聽}

聽聽聽聽聽聽聽聽}

聽聽聽聽}

}


void 聽solve() {
聽聽聽聽
for (聽 int 聽i = 0 ;聽i < 聽( 1 << n);聽 ++ i聽)
聽聽聽聽聽聽聽聽
for ( int 聽j = 0 ;聽j < 聽n;聽 ++ j聽)聽dp[i][j] = 聽inf;

聽聽聽聽dp[
0 ][ 0 ] = 0 ;
聽聽聽聽
for (聽 int 聽i = 0 ;聽i < 聽n;聽 ++ i聽)
聽聽聽聽聽聽聽聽
if (聽need[i] == 0 聽)聽dp[ 1 << i][i] = 1 ;
聽聽聽聽
聽聽聽聽
for (聽 int 聽s = 0 ;聽s < 聽( 1 << n);聽 ++ s聽) {
聽聽聽聽聽聽聽聽
for (聽 int 聽i = 0 ;聽i < 聽n;聽 ++ i聽) {
聽聽聽聽聽聽聽聽聽聽聽聽
if (聽(聽s & 聽( 1 << i)聽) == 0 聽)聽 continue ;

聽聽聽聽聽聽聽聽聽聽聽聽
for (聽 int 聽j = 0 ;聽j < 聽n;聽 ++ j聽) {
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
if (聽s & 聽( 1 << j)聽)聽 continue ;
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
if (聽(s & 聽need[j]) != 聽need[j]聽)聽 continue ;

聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
if (聽dp[s][i] + 聽(聽color[i] != 聽color[j]聽) < 聽dp[s | ( 1 << j)][j]聽) {
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽dp[s
| ( 1 << j)][j] = 聽dp[s][i] + 聽(聽color[i] != 聽color[j]聽);
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽}

聽聽聽聽聽聽聽聽聽聽聽聽}

聽聽聽聽聽聽聽聽}

聽聽聽聽}


聽聽聽聽
int 聽ans = 聽inf;
聽聽聽聽
for (聽 int 聽i = 0 ;聽i < 聽n;聽 ++ i聽)
聽聽聽聽聽聽聽聽
if (聽dp[( 1 << n) - 1 ][i] < 聽ans聽)聽ans = 聽dp[( 1 << n) - 1 ][i];

聽聽聽聽printf(
" %d\n " ,聽ans聽);
}


int 聽main() {
聽聽聽聽
int 聽test;
聽聽聽聽scanf(
" %d " , & test聽);

聽聽聽聽
while (聽test -- 聽) {
聽聽聽聽聽聽聽聽scanf(
" %d " , & n聽);

聽聽聽聽聽聽聽聽
for (聽 int 聽i = 0 ;聽i < 聽n;聽 ++ i聽) {
聽聽聽聽聽聽聽聽聽聽聽聽scanf(
" %d%d%d%d " ,聽 & pnt[i].Ly,聽 & pnt[i].Lx,聽 & pnt[i].Ry,聽聽 & pnt[i].Rx聽);
聽聽聽聽聽聽聽聽聽聽聽聽scanf(
" %d " ,聽color + 聽i聽);
聽聽聽聽聽聽聽聽}


聽聽聽聽聽聽聽聽init();
聽聽聽聽聽聽聽聽solve();
聽聽聽聽}

聽聽聽聽
聽聽聽聽
return 0 ;
}



Darren 2009-10-08 14:54 鍙戣〃璇勮
]]>
HDU 1255http://www.shnenglu.com/Darren/archive/2009/08/06/92384.htmlDarrenDarrenThu, 06 Aug 2009 01:59:00 GMThttp://www.shnenglu.com/Darren/archive/2009/08/06/92384.htmlhttp://www.shnenglu.com/Darren/comments/92384.htmlhttp://www.shnenglu.com/Darren/archive/2009/08/06/92384.html#Feedback0http://www.shnenglu.com/Darren/comments/commentRss/92384.htmlhttp://www.shnenglu.com/Darren/services/trackbacks/92384.html #include聽 < iostream >
#include聽
< algorithm >

using namespace 聽std;

#define 聽N聽2110

struct 聽Tree {
聽聽聽聽
double 聽length,聽len;
聽聽聽聽
int 聽聽聽聽cnt;
聽聽聽聽Tree()
{聽length = 0 ;聽cnt = 0 ;聽}
聽聽聽聽
void 聽init() {聽length = 0 ;聽cnt = 0 ;聽len = 0 ;聽}
}
tb[ 10100 ];

double 聽x1[N],聽y1[N],聽x2[N],聽y2[N],聽xx[N],聽idx[N];
int 聽pos,聽n;

struct 聽Line {
聽聽聽聽
double 聽y,聽x1,聽x2;
聽聽聽聽
bool 聽type;
}
line[N];

bool operator < (聽Line聽 const & 聽a,聽Line聽 const & 聽b聽) {
聽聽聽聽
return 聽a.y < 聽b.y;聽}

聽聽聽聽
inline聽
int 聽bsearch(聽 double 聽value聽) {
聽聽聽聽
int 聽low = 1 ,聽high = 聽pos + 1 ;
聽聽聽聽
while (聽low <= 聽high聽) {
聽聽聽聽聽聽聽聽
int 聽mid = 聽(low + 聽high) >> 1 ;
聽聽聽聽聽聽聽聽
if (聽idx[mid] > 聽value聽)聽high = 聽mid - 1 ;
聽聽聽聽聽聽聽聽
else if (聽idx[mid] < 聽value聽)聽low = 聽mid + 1 ;
聽聽聽聽聽聽聽聽
else return 聽mid;聽}

}


inline聽
void 聽update(聽 int 聽rt,聽 int 聽l,聽 int 聽r聽) {
聽聽聽聽
if (聽tb[rt].cnt聽)聽tb[rt].length = 聽idx[r] - 聽idx[l];
聽聽聽聽
else if (聽l + 1 == 聽r聽)聽tb[rt].length = 0 ;
聽聽聽聽
else 聽tb[rt].length = 聽tb[rt << 1 ].length + 聽tb[(rt << 1 ) + 1 ].length;
}


inline聽
void 聽update2(聽 int 聽rt,聽 int 聽l,聽 int 聽r聽) {
聽聽聽聽
if (聽tb[rt].cnt > 1 聽)聽tb[rt].len = 聽idx[r] - 聽idx[l];
聽聽聽聽
else if (聽tb[rt].cnt == 1 聽)聽tb[rt].len = 聽tb[rt << 1 ].length + 聽tb[(rt << 1 ) + 1 ].length;
聽聽聽聽
else 聽tb[rt].len = 聽tb[rt << 1 ].len + 聽tb[(rt << 1 ) + 1 ].len;聽}


void 聽deal(聽 int 聽rt,聽 int 聽l,聽 int 聽r,聽 int 聽a,聽 int 聽b,聽 int 聽t聽) {
聽聽聽聽
if (聽a <= 聽l聽 && 聽b >= 聽r聽) {
聽聽聽聽聽聽聽聽tb[rt].cnt
+= 聽t;聽update(聽rt,聽l,聽r聽);聽update2(聽rt,聽l,聽r聽);聽聽 return ;聽}

聽聽聽聽聽聽聽聽
聽聽聽聽
int 聽mid = 聽(l + 聽r) >> 1 ;
聽聽聽聽
if (聽a < 聽mid聽)聽deal(聽rt << 1 ,聽l,聽mid,聽a,聽b,聽t);
聽聽聽聽
if (聽b > 聽mid聽)聽deal(聽(rt << 1 ) + 1 ,聽mid,聽r,聽a,聽b,聽t聽);
聽聽聽聽
聽聽聽聽update(聽rt,聽l,聽r聽);聽update2(聽rt,聽l,聽r聽);
}


int 聽main() {
聽聽聽聽
int 聽test = 1 ;
聽聽聽聽scanf(
" %d " , & test聽);
聽聽聽聽
while (聽test -- 聽) {
聽聽聽聽聽聽聽聽scanf(
" %d " , & n);
聽聽聽聽聽聽聽聽
for (聽 int 聽i = 0 ;聽i <= 10000 ;聽 ++ i聽)聽tb[i].init();
聽聽聽聽聽聽聽聽
for (聽 int 聽i = 0 ;聽i < 聽n;聽 ++ i聽)聽 {
聽聽聽聽聽聽聽聽聽聽聽聽scanf(
" %lf%lf%lf%lf " ,聽x1 + 聽i,聽y1 + 聽i,聽x2 + 聽i,聽y2 + 聽i聽);
聽聽聽聽聽聽聽聽聽聽聽聽line[
2 * i].y = 聽y1[i];聽聽聽line[ 2 * i].x1 = 聽x1[i];聽
聽聽聽聽聽聽聽聽聽聽聽聽line[
2 * i].x2 = 聽x2[i];聽聽line[ 2 * i].type = 0 ;
聽聽聽聽聽聽聽聽聽聽聽聽
聽聽聽聽聽聽聽聽聽聽聽聽xx[
2 * i] = 聽x1[i];聽xx[ 2 * i + 1 ] = 聽x2[i];
聽聽聽聽聽聽聽聽聽聽聽聽line[
2 * i + 1 ].y = 聽y2[i];聽聽line[ 2 * i + 1 ].x1 = 聽x1[i];
聽聽聽聽聽聽聽聽聽聽聽聽line[
2 * i + 1 ].x2 = 聽x2[i];聽line[ 2 * i + 1 ].type = 1 ;
聽聽聽聽聽聽聽聽}

聽聽聽聽聽聽聽聽sort(聽xx,聽xx
+ 2 * 聽n聽);聽聽聽聽sort(聽line,聽line + 2 * 聽n聽);
聽聽聽聽聽聽聽聽pos
= 1 ;聽idx[ 1 ] = 聽xx[ 0 ];
聽聽聽聽聽聽聽聽
for (聽 int 聽i = 1 ;聽i < 2 * 聽n;聽 ++ i聽)
聽聽聽聽聽聽聽聽
if (聽xx[i] != 聽xx[i - 1 ]聽)聽idx[ ++ pos] = 聽xx[i];
聽聽聽聽聽聽聽聽
聽聽聽聽聽聽聽聽
double 聽ans = 0 ;
聽聽聽聽聽聽聽聽
for (聽 int 聽i = 0 ;聽i < 2 * 聽n - 1 ;聽 ++ i聽) {
聽聽聽聽聽聽聽聽聽聽聽聽
int 聽u = 聽bsearch(聽line[i].x1聽),聽v = 聽bsearch(聽line[i].x2聽);
聽聽聽聽聽聽聽聽聽聽聽聽
if (聽line[i].type == 0 聽)聽deal(聽 1 ,聽 1 ,聽pos,聽u,聽v,聽 1 聽);
聽聽聽聽聽聽聽聽聽聽聽聽
else 聽deal(聽 1 ,聽 1 ,聽pos,聽u,聽v,聽 - 1 聽);
聽聽聽聽聽聽聽聽聽聽聽聽
聽聽聽聽聽聽聽聽聽聽聽聽ans
+= 聽tb[ 1 ].len * 聽(聽line[i + 1 ].y - 聽line[i].y聽);
聽聽聽聽聽聽聽聽}

聽聽聽聽聽聽聽聽printf(
" %.2lf\n " ,聽ans聽);
聽聽聽聽}

聽聽聽聽
聽聽聽聽
return 0 ;
}



Darren 2009-08-06 09:59 鍙戣〃璇勮
]]>
PKU銆銆1151http://www.shnenglu.com/Darren/archive/2009/08/06/92365.htmlDarrenDarrenWed, 05 Aug 2009 16:49:00 GMThttp://www.shnenglu.com/Darren/archive/2009/08/06/92365.htmlhttp://www.shnenglu.com/Darren/comments/92365.htmlhttp://www.shnenglu.com/Darren/archive/2009/08/06/92365.html#Feedback0http://www.shnenglu.com/Darren/comments/commentRss/92365.htmlhttp://www.shnenglu.com/Darren/services/trackbacks/92365.html闃呰鍏ㄦ枃

Darren 2009-08-06 00:49 鍙戣〃璇勮
]]>
2009騫碅CM-ICPC浜氭床鍖洪閫夎禌鍏辮鍗佷簲涓禌鍖哄涓?鎸夌幇鍦鴻禌鏃ユ湡鎺掑簭)http://www.shnenglu.com/Darren/archive/2009/08/04/92216.htmlDarrenDarrenTue, 04 Aug 2009 13:35:00 GMThttp://www.shnenglu.com/Darren/archive/2009/08/04/92216.htmlhttp://www.shnenglu.com/Darren/comments/92216.htmlhttp://www.shnenglu.com/Darren/archive/2009/08/04/92216.html#Feedback1http://www.shnenglu.com/Darren/comments/commentRss/92216.htmlhttp://www.shnenglu.com/Darren/services/trackbacks/92216.html1銆丠arbin 鍝堝皵婊ㄨ禌鍖猴紙鍝堝皵婊ㄥ伐涓氬ぇ瀛︼級
緗戠粶閫夋嫈璧涙棩鏈燂細2009騫?鏈?3鏃?14:00-17:00
鐜板満璧涙棩鏈燂細2009騫?鏈?6鏃ワ綖27鏃?br>http://acm.hit.edu.cn/

2銆丏haka 杈懼崱璧涘尯錛堝瓱鍔犳媺鍥?Northsouth University錛?br>鐜板満璧涙棩鏈燂細2009騫?0鏈?鏃?br>http://www.northsouth.edu/acm/

3銆丟walior-Kanpur 鐡滃粬灝?鍧庢櫘灝旇禌鍖猴紙鍗板害 IIITM Gwalior and Indian Institute of Technology, India錛?br>鐜板満璧涙棩鏈燂細2009騫?0鏈?鏃ワ綖4鏃?br>http://www.cse.iitk.ac.in/users/acm/

4銆丠efei 鍚堣偉璧涘尯錛堜腑鍥界瀛︽妧鏈ぇ瀛︼級
緗戠粶閫夋嫈璧涙棩鏈燂細2009騫?鏈?鏃?14:00-17:00
鐜板満璧涙棩鏈燂細2009騫?0鏈?0鏃ワ綖11鏃?br>http://acm.ustc.edu.cn/

5銆丯ingbo 瀹佹嘗璧涘尯錛堟禉姹熷ぇ瀛﹀畞娉㈢悊宸ュ闄級
緗戠粶閫夋嫈璧涙棩鏈燂細2009騫?鏈?2鏃?br>鐜板満璧涙棩鏈燂細2009騫?0鏈?7鏃ワ綖18鏃?br>http://acmasia09.nit.net.cn/

6銆丣akarta 闆呭姞杈捐禌鍖猴紙鍗板凹 Binus University錛?br>鐜板満璧涙棩鏈燂細2009騫?0鏈?1鏃?br>http://icpc.ewubd.edu/

7銆丮anila 椹凹鎷夎禌鍖猴紙鑿插緥瀹?Ateneo de Manila University錛?br>鐜板満璧涙棩鏈燂細2009騫?0鏈?2鏃ワ綖23鏃?br>http://www.math.admu.edu.ph/acm/

8銆丼hanghai 涓婃搗璧涘尯錛堜笢鍗庡ぇ瀛︼級
緗戠粶閫夋嫈璧涙棩鏈燂細2009騫?鏈?0鏃?12:00-17:00)
鐜板満璧涙棩鏈燂細2009騫?0鏈?4鏃ワ綖25鏃?br>http://acm.dhu.edu.cn

9銆丠sinchu 鏂扮璧涘尯錛堜氦閫氬ぇ瀛︼級
鎶ュ悕鎴鏃ユ湡錛?009騫?鏈?9鏃?br>鐜板満璧涙棩鏈燂細2009騫?0鏈?0鏃ワ綖31鏃?br>http://icpc2009.nctu.edu.tw/

10銆乄uhan 姝︽眽璧涘尯錛堟姹夊ぇ瀛︼級
緗戠粶閫夋嫈璧涙棩鏈燂細2009騫?0鏈?
鐜板満璧涙棩鏈燂細2009騫?0鏈?1鏃ワ綖11鏈?鏃?br>http://acm.whu.edu.cn/

11銆丄mritapuri 闃垮閲屽鏅噷璧涘尯錛堝嵃搴?Amrita Vishwa Vidyapeetham, Amritapuri Campus錛?br>鐜板満璧涙棩鏈燂細2009騫?1鏈?鏃?br>http://icpc.amrita.ac.in/

12銆丳huket 鏅悏宀涜禌鍖猴紙娉板浗 Prince of Songkla University, Phuket Campus錛?br>鎶ュ悕鎴鏃ユ湡錛?009騫?鏈?0鏃?br>鐜板満璧涙棩鏈燂細2009騫?1鏈?鏃ワ綖4鏃?br>http://www.acmicpc-thailand.org/

13銆丼eoul 棣栧皵璧涘尯錛堥煩鍥?Korea Advanced Institute of Science and Technology錛?br>鎶ュ悕鎴鏃ユ湡錛?009騫?鏈?1鏃?br>鐜板満璧涙棩鏈燂細2009騫?1鏈?鏃ワ綖6鏃?br>http://acm.kaist.ac.kr/

14銆乀ehran 寰烽粦鍏拌禌鍖猴紙浼婃湕 Sharif University of Technology錛?br>鐜板満璧涙棩鏈燂細2009騫?1鏈?鏃?br>http://sharif.edu/~acmicpc

15銆乀okyo 涓滀含璧涘尯錛堟棩鏈棭紼葷敯澶у錛?br>鐜板満璧涙棩鏈燂細2009騫?1鏈?鏃ワ綖8鏃?br>http://www.waseda.jp/assoc-icpc2009/en/index.html

鍙傝禌鎶ュ悕緗戝潃

http://cm.baylor.edu/welcome.icpc

浜氭床楂樻牎鍙粍闃熷弬鍔犲叏閮ㄥ崄浜斾釜璧涘尯鐨勯閫夎禌錛屼絾姣忎綅鍙傝禌閫夋墜鏈澶氬彧鑳芥敞鍐屽弬鍔?strong>涓や釜璧涘尯鐨勯閫夎禌銆?/p>

Darren 2009-08-04 21:35 鍙戣〃璇勮
]]>
acmer蹇呯湅鐨?6涓acm鎬佸害http://www.shnenglu.com/Darren/archive/2009/08/03/92099.htmlDarrenDarrenMon, 03 Aug 2009 14:05:00 GMThttp://www.shnenglu.com/Darren/archive/2009/08/03/92099.htmlhttp://www.shnenglu.com/Darren/comments/92099.htmlhttp://www.shnenglu.com/Darren/archive/2009/08/03/92099.html#Feedback2http://www.shnenglu.com/Darren/comments/commentRss/92099.htmlhttp://www.shnenglu.com/Darren/services/trackbacks/92099.htmlAttempt


Keep on attempting!

灝濊瘯錛?/font>灝濊瘯錛屽啀灝濊瘯錛?/font>


Bravery


Never lose heart, be sure you are brave enough to face failure!

鍕囨暍鍦拌法榪?font face="Batang, 바탕, serif">澶?/font>璐?font face="Batang, 바탕, serif">錛屾垚鍔熷氨鍦ㄥ墠鏂廣?/font>


Cooperation


It is teamwork, you are not alone.

鎴戜滑鏄綔涓轟竴涓洟闃熶竴璧峰姫鍔涚殑銆?/font>


Diligence


Working hard, and bear abundant fruit.

涓浠借曡橈紝涓浠芥敹鑾鳳紒


Enjoy


Enjoy the work.

鎬佸害鍐沖畾涓鍒囷紝ACM-ICPC鏄揩涔愮殑錛?/font>


Facility


Facility in programming promise the champion.

鎵庡疄鐨勭紪紼嬭兘鍔涙槸澶哄啝鐨勬湁鍔涙敮鏌便?/font>


Galaxy


ACM-ICPC is just a galaxy.

緹よ嫳鑱氫細鏂規(guī)樉鐜嬭呮湰鑹層?/font>


Honor


It is great honor to try the contest.

ACM錛屼竴嬈℃棤鎮(zhèn)旂殑灝濊瘯錛屼竴孌電簿褰╃殑浜虹敓銆?/font>


Intelligence


Who is the cleverest?

涓鍦烘櫤鎱х殑杈冮噺銆?/font>


Judger


Judge in the contest as God in the world.

瑁佸垽浜?/font>ACM錛屽氨濡傚悓涓婂笣浜庝笘鐣屻?


Knotty


The way to champion is knotty.

鍐犲啗涔嬭礬閾烘弧鑽嗘銆?/font>


Lucky


Luck permits!

ACM錛屼竴鍒囩殕鏈夊彲鑳姐?/font>


Magic


Magic ideas work wonder.

鐏靛厜涓闂殑鐬棿錛屾垜浠煡閬?/font>ACM鍘熸潵鏄竴鍦虹璇濈殑鎸戞垬銆?/font>


Naturally


It’s naturally for us to win the ACM.

鐢ㄦ垜浠殑鑳滃埄鏉ヨ癄閲婃浘緇忕殑鍔姏錛岃壈杈涘拰鍧氫俊錛?/font>


Objective


To achieve the objective is always in the next second…

鎴栬鎴戜滑鏇村ぇ鐨勬敹鑾峰湪浜庢垜浠箣闂磋涓嬬墷涓嶅彲鐮寸殑瑾撹█…



Parents


On this long hard load, we wonder, we hesitate. It’s your power push me forward, my parents!

鎴戠埍浣犱滑錛佷翰鐖辯殑鐖哥埜濡堝~


Quality


The quality of a contest should be focus on person rather than skill.

鎬繪湁鏇撮棯浜殑鏄熻鐪間簬娣遍們鐨勫絀?#8230;


Schedule


There always exists something out of schedule.

浠庢椂闂磋〃涓婃垜浠湅瑙佸偓淇冪湅瑙佽禌紼嬭繕鏈夋皵鐞冦佽繕鏈夋湭鏉?#8230;


Team


The honor belongs to our team! Come on!

涓鍒囨潵鑷?/font>ACM鐨勫鏈猴紝鎰熸縺浠栬鎴戜滑鐩歌瘑銆?/font>


University


Shang hai Jiaotong University records my growing.

涔熻鏈変竴澶╂濇簮婀栦細鍐犱笂鎴戠殑鍚嶅瓧~


Victory


Two for victory~

姘歌繙璁板緱瀵圭潃闀滃ご鎴戜滑鐨勭瑧閭d箞鐏跨儌銆?/font>


Wing


We came to the fore, flew without wings.

鏄ぉ浣胯祴浜堜簡鎴戦緲旂殑緲呰唨錛屾垜鐢ㄥ畠涓捐搗浜?/font>ACM鐨勫鏉?/font>


X


We fight against the x!

闈㈠鏈煡錛屾槸鎴戜滑鐫佸ぇ濂藉鐨勫弻鐪鹼紝涔熸槸鎴戜滑鏃犵晱鐨勫悜鍓嶏紝濂旇蕩榪滄柟銆?/font>


Yesterday


Yesterday once more.

鍥炵湼閭d簺杈夌厡錛屽敮鏈夊繕鍗存墠鑳藉嚡鏃嬶紒


Zero


All begin with zero…

鎴戜滑绔欏湪鏂扮殑璧風偣涓婏紝鏁磋寰呭彂錛?/font>



Darren 2009-08-03 22:05 鍙戣〃璇勮
]]>
ZJU 3228 Searching the String ( AC 鑷姩鏈?)http://www.shnenglu.com/Darren/archive/2009/08/02/91977.htmlDarrenDarrenSun, 02 Aug 2009 14:05:00 GMThttp://www.shnenglu.com/Darren/archive/2009/08/02/91977.htmlhttp://www.shnenglu.com/Darren/comments/91977.htmlhttp://www.shnenglu.com/Darren/archive/2009/08/02/91977.html#Feedback1http://www.shnenglu.com/Darren/comments/commentRss/91977.htmlhttp://www.shnenglu.com/Darren/services/trackbacks/91977.html闃呰鍏ㄦ枃

Darren 2009-08-02 22:05 鍙戣〃璇勮
]]>
Pku 3169 Layouthttp://www.shnenglu.com/Darren/archive/2009/07/20/90649.htmlDarrenDarrenMon, 20 Jul 2009 11:55:00 GMThttp://www.shnenglu.com/Darren/archive/2009/07/20/90649.htmlhttp://www.shnenglu.com/Darren/comments/90649.htmlhttp://www.shnenglu.com/Darren/archive/2009/07/20/90649.html#Feedback0http://www.shnenglu.com/Darren/comments/commentRss/90649.htmlhttp://www.shnenglu.com/Darren/services/trackbacks/90649.html #include聽 < stdio.h >
#include聽
< stdlib.h >
#include聽
< string .h >

#define 聽N聽1005
#define 聽inf聽1<<29

struct 聽Edge{
聽聽聽聽
int 聽u,聽v,聽d;
聽聽聽聽Edge(聽
int 聽a = 0 ,聽 int 聽b = 0 ,聽 int 聽c = 0 聽):
聽聽聽聽聽聽聽聽u(a),聽v(b),聽d(c)聽{}
};

int 聽n,聽ml,聽md,聽s = 0 ;
Edge聽聽ege[
20010 ];
int 聽dist[N];

int 聽bell_man(){
聽聽聽聽
for (聽 int 聽i = 1 ;聽i <= 聽n;聽 ++ i聽)聽dist[i] = 聽inf;
聽聽聽聽dist[
1 ] = 0 ;
聽聽聽聽
聽聽聽聽
int 聽flag = 0 ;
聽聽聽聽
for (聽 int 聽i = 1 ;聽i <= 聽n;聽 ++ i聽){
聽聽聽聽聽聽聽聽flag
= 0 ;
聽聽聽聽聽聽聽聽
for (聽 int 聽j = 0 ;聽j < 聽s;聽 ++ j聽){
聽聽聽聽聽聽聽聽聽聽聽聽
int 聽u = 聽ege[j].u,聽v = 聽ege[j].v,聽w = 聽ege[j].d;
聽聽聽聽聽聽聽聽聽聽聽聽
if (聽dist[u] + 聽w < 聽dist[v]聽)聽dist[v] = 聽dist[u] + 聽w,聽flag = 1 ;
聽聽聽聽聽聽聽聽}
聽聽聽聽聽聽聽聽
if (聽 ! flag聽)聽 break ;
聽聽聽聽}
聽聽聽聽
if (聽flag聽)聽 return - 1 ;
聽聽聽聽
else if (聽dist[n] == 聽inf聽)聽 return - 2 ;
聽聽聽聽
else return 聽dist[n];
}

int 聽main(){
聽聽聽聽scanf(
" %d%d%d " , & n, & ml, & md聽);
聽聽聽聽
int 聽u,聽v,聽d;
聽聽聽聽
while (聽ml -- 聽){
聽聽聽聽聽聽聽聽scanf(
" %d%d%d " , & u, & v, & d聽);
聽聽聽聽聽聽聽聽ege[s
++ ] = 聽Edge(聽u,聽v,聽d聽);
聽聽聽聽}
聽聽聽聽
while (聽md -- 聽){
聽聽聽聽聽聽聽聽scanf(
" %d%d%d " , & u, & v, & d聽);
聽聽聽聽聽聽聽聽ege[s
++ ] = 聽Edge(聽v,聽u,聽 - d聽);
聽聽聽聽}
聽聽聽聽printf(
" %d\n " ,聽bell_man()聽);

聽聽聽聽
return 0 ;
}


Darren 2009-07-20 19:55 鍙戣〃璇勮
]]>
Pku 1986 Distance Querieshttp://www.shnenglu.com/Darren/archive/2009/07/20/90590.htmlDarrenDarrenMon, 20 Jul 2009 02:56:00 GMThttp://www.shnenglu.com/Darren/archive/2009/07/20/90590.htmlhttp://www.shnenglu.com/Darren/comments/90590.htmlhttp://www.shnenglu.com/Darren/archive/2009/07/20/90590.html#Feedback0http://www.shnenglu.com/Darren/comments/commentRss/90590.htmlhttp://www.shnenglu.com/Darren/services/trackbacks/90590.html #include聽 < iostream >
#include聽
< vector >

using namespace 聽std;

#define 聽N聽40010
typedef聽pair
< int , int > 聽PAIR;

int 聽m,聽n;
vector
< PAIR > 聽query[N],聽map[N];

int 聽uset[N] = 聽{ 0 },聽acs[N],聽flag[N] = 聽{ 0 },聽dis[N] = 聽{ 0 },聽ans[N],聽visite[N] = { 0 };

int 聽find(聽 int 聽x聽){
聽聽聽聽
while (聽x != 聽uset[x]聽)聽x = 聽uset[x];
聽聽聽聽
return 聽x;聽}

void 聽join(聽 int 聽x,聽 int 聽y聽){聽聽uset[聽find(x)聽] = 聽uset[聽find(y)聽];聽}

void 聽dfs(聽 int 聽u,聽 int 聽d聽){
聽聽聽聽uset[u]
= 聽u;聽acs[u] = 聽u;聽dis[u] = 聽d;聽visite[u] = 1 ;
聽聽聽聽
for (聽size_t聽i = 0 ;聽i < 聽map[u].size();聽 ++ i聽){
聽聽聽聽聽聽聽聽
int 聽v = 聽map[u][i].first,聽w = 聽map[u][i].second;
聽聽聽聽聽聽聽聽
if (聽 ! visite[v]聽){
聽聽聽聽聽聽聽聽聽聽聽聽dfs(聽v,聽d
+ 聽w聽);
聽聽聽聽聽聽聽聽聽聽聽聽join(聽u,聽v聽);聽acs[聽find(u)聽]
= 聽u;聽聽}
聽聽聽聽}
聽聽聽聽
聽聽聽聽flag[u]
= 1 ;
聽聽聽聽
for (聽size_t聽i = 0 ;聽i < 聽query[u].size();聽 ++ i聽){
聽聽聽聽聽聽聽聽
int 聽v = 聽query[u][i].first,聽w = 聽query[u][i].second;
聽聽聽聽聽聽聽聽
聽聽聽聽聽聽聽聽
if (聽flag[v]聽)聽ans[w] = 聽dis[u] + 聽dis[v] - 2 * 聽dis[聽acs[聽find(v)聽]聽];
聽聽聽聽}聽聽聽聽
}

int 聽main(){
聽聽聽聽
int 聽u,聽v,聽d;
聽聽聽聽
char 聽s[ 10 ];
聽聽聽聽
聽聽聽聽scanf(
" %d%d " , & n, & m);
聽聽聽聽
while (聽m -- 聽){
聽聽聽聽聽聽聽聽scanf(
" %d%d%d%s " , & u, & v, & d,s聽);
聽聽聽聽聽聽聽聽map[u].push_back(聽PAIR(v,d)聽);
聽聽聽聽聽聽聽聽map[v].push_back(聽PAIR(u,d)聽);
聽聽聽聽}
聽聽聽聽
聽聽聽聽scanf(
" %d " , & m聽);
聽聽聽聽
for (聽 int 聽i = 1 ;聽i <= 聽m;聽 ++ i聽){
聽聽聽聽聽聽聽聽scanf(
" %d%d " , & u, & v聽);
聽聽聽聽聽聽聽聽query[u].push_back(聽PAIR(v,i)聽);
聽聽聽聽聽聽聽聽query[v].push_back(聽PAIR(u,i)聽);
聽聽聽聽}
聽聽聽聽memset(聽flag,聽
0 ,聽 sizeof (flag)聽);
聽聽聽聽memset(聽visite,聽
0 ,聽 sizeof (visite)聽);
聽聽聽聽
聽聽聽聽dfs(聽
1 ,聽 0 聽);聽
聽聽聽聽
for (聽 int 聽i = 1 ;聽i <= 聽m;聽 ++ i聽)聽printf( " %d\n " ,聽ans[i]聽);
聽聽聽聽
聽聽聽聽
return 0 ;
}


Darren 2009-07-20 10:56 鍙戣〃璇勮
]]>
Pku 1276 Cash Machinehttp://www.shnenglu.com/Darren/archive/2009/07/19/90518.htmlDarrenDarrenSun, 19 Jul 2009 05:44:00 GMThttp://www.shnenglu.com/Darren/archive/2009/07/19/90518.htmlhttp://www.shnenglu.com/Darren/comments/90518.htmlhttp://www.shnenglu.com/Darren/archive/2009/07/19/90518.html#Feedback1http://www.shnenglu.com/Darren/comments/commentRss/90518.htmlhttp://www.shnenglu.com/Darren/services/trackbacks/90518.html #include聽 < iostream >

using namespace 聽std;

#define 聽N聽100001

int 聽nk[ 11 ],聽dk[ 11 ],聽n,聽m,聽ans[N],聽num[N];

int 聽main(){
聽聽聽聽
while (聽scanf( " %d%d " , & m, & n聽) != 聽EOF聽){
聽聽聽聽聽聽聽聽
for (聽 int 聽i = 0 ;聽i < 聽n;聽 ++ i聽)聽scanf( " %d%d " ,聽nk + 聽i,聽dk + 聽i聽);
聽聽聽聽聽聽聽聽
for (聽 int 聽i = 0 ;聽i <= 聽m;聽 ++ i聽)聽ans[i] = 0 ;聽ans[ 0 ] = 1 ;
聽聽聽聽聽聽聽聽
聽聽聽聽聽聽聽聽
for (聽 int 聽i = 0 ;聽i < 聽n;聽 ++ i聽){
聽聽聽聽聽聽聽聽聽聽聽聽
for (聽 int 聽j = 0 ;聽j <= 聽m;聽 ++ j聽)聽num[j] = 0 ;
聽聽聽聽聽聽聽聽聽聽聽聽
聽聽聽聽聽聽聽聽聽聽聽聽
for (聽 int 聽j = 聽dk[i];聽j <= 聽m;聽 ++ j聽)
聽聽聽聽聽聽聽聽聽聽聽聽
if (聽 ! 聽ans[j]聽 && 聽ans[j - dk[i]]聽 && 聽num[j - 聽dk[i]] < 聽nk[i]聽){
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽num[j]
= 聽num[j - dk[i]] + 1 ;
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽ans[j]
= 1 ;聽}
聽聽聽聽聽聽聽聽}
聽聽聽聽聽聽聽聽
聽聽聽聽聽聽聽聽
int 聽res = 聽m;
聽聽聽聽聽聽聽聽
while (聽ans[res] == 0 && 聽res >= 1 聽)聽res -- ;
聽聽聽聽聽聽聽聽printf(
" %d\n " ,聽res聽);
聽聽聽聽}
聽聽聽聽
聽聽聽聽
return 0 ;
}


Darren 2009-07-19 13:44 鍙戣〃璇勮
]]>
久久综合88熟人妻| 久久96国产精品久久久| 久久亚洲精品中文字幕三区| 国产香蕉久久精品综合网| 国产一区二区精品久久凹凸| 青青青国产精品国产精品久久久久| 亚洲国产精品无码久久久蜜芽| 亚洲精品美女久久久久99小说 | 久久亚洲精品中文字幕| 久久国产劲爆AV内射—百度| 2020国产成人久久精品| 亚洲精品成人网久久久久久| 无码任你躁久久久久久| 思思久久99热免费精品6| 久久久久久国产a免费观看黄色大片| 伊人久久无码精品中文字幕| 日韩va亚洲va欧美va久久| 亚洲成av人片不卡无码久久| 女人高潮久久久叫人喷水| 久久精品国产日本波多野结衣| 久久亚洲AV成人无码软件| 精品熟女少妇AV免费久久| 无码人妻久久一区二区三区免费丨| 亚洲精品乱码久久久久久按摩 | 久久精品一本到99热免费| yy6080久久| 国产精品久久久久天天影视| 国产视频久久| 伊人久久大香线蕉成人| 久久精品无码专区免费青青| 青青草原综合久久| 久久久久亚洲国产| 99久久精品国产高清一区二区 | 久久久高清免费视频| 欧美噜噜久久久XXX| 国产AV影片久久久久久 | 香蕉久久av一区二区三区| a高清免费毛片久久| 亚洲七七久久精品中文国产 | 久久av免费天堂小草播放| 欧美无乱码久久久免费午夜一区二区三区中文字幕 |