七行プログラミング p ..
[
2ch
|
▼Menu
]
■コピペモード
□
スレを通常表示
□
オプションモード
□このスレッドのURL
■項目テキスト
245:244 07/01/24 19:41:10 同じくソート解除 using System;using System.Collections.Generic;namespace DBWT{struct DE{public DE(int i,byte d){Ind=i;Data = d;}public int Ind;public byte Data;}public static class DeBlockSort{public static void Restoration(int ind,ref byte[]data ){int i,l=data.Length;DE[] de=new DE[l];for(i=0;i<l;i++){de[i]=new DE(i,data[i ]);}Array.Sort<DE>(de,new Comp());for(i=0;i<l;i++){data[i]=de[ind].Data;ind= de[ind].Ind;}}}class Comp:IComparer<DE>{public int Compare(DE x,DE y){if(x .Data != y.Data){return(int)(x.Data-y.Data);}else{return x.Ind-y.Ind;}}}} やっぱりまだまだです orz 246:デフォルトの名無しさん 07/01/24 20:24:34 perl -e "for(;;){print eval<STDIN>}" インタラクティブパールできたよー 247:デフォルトの名無しさん 07/01/24 20:31:50 引数何も無しでおkだから、さ
次ページ
最新レス表示
スレッドの検索
類似スレ一覧
話題のニュース
おまかせリスト
▼オプションを表示
レスジャンプ
mixiチェック!
Twitterに投稿
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch
5388日前に更新/140 KB
担当:undef