[表示 : 全て 最新50 1-99 101- 201- 301- 401- 2chのread.cgiへ]
Update time : 08/07 07:44 / Filesize : 131 KB / Number-of Response : 449
[このスレッドの書き込みを削除する]
[+板 最近立ったスレ&熱いスレ一覧 : +板 最近立ったスレ/記者別一覧] [類似スレッド一覧]


↑キャッシュ検索、類似スレ動作を修正しました、ご迷惑をお掛けしました

C/C++の宿題片付けます 124代目



294 名前:デフォルトの名無しさん mailto:sage [2009/03/16(月) 01:25:59 ]
修正?
void quick(Data a[], int left, int right,
int Cmp(Data x, Data y, int order), int order){
int pl;int pr;Data x;int _right;
_right = right;
while(1)
{
pl = left;pr = right;x = a[(pl+pr)/2];
do {while(Cmp(x, a[pl], order)) pl++;while(Cmp(a[pr], x, order)) pr--;
if ( pl <= pr ){swap(Data , a[pl], a[pr]);pl++;pr--;}
} while(pl <= pr );
if (left < pr) {right = pr; continue;}
break;
}
left = 1;right = _right;
while(1)
{
pl = left;pr = right;x = a[(pl+pr)/2];
do {while(Cmp(x, a[pl], order)) pl++;while(Cmp(a[pr], x, order)) pr--;
if ( pl <= pr ){swap(Data , a[pl], a[pr]);pl++;pr--;}
} while(pl <= pr );
if (pl < right) {left = pl; continue;}
break;
}
}






[ 続きを読む ] / [ 携帯版 ]

全部読む 前100 次100 最新50 [ このスレをブックマーク! 携帯に送る ] 2chのread.cgiへ
[+板 最近立ったスレ&熱いスレ一覧 : +板 最近立ったスレ/記者別一覧]( ´∀`)<131KB

read.cgi ver5.27 [feat.BBS2 +1.6] / e.0.2 (02/09/03) / eucaly.net products.
担当:undef