// http://i...content-available-to-author-only...e.com/cJLU0O
// 並べ替え
// 重複非表示
#include<stdio.h>
#include<string.h>
char res_d[4 * 3 * 2 * 1][5]; // 結果貯蔵
int res_i; // 結果個数
// 並べ替え結果処理
void kekka_shori(char *p)
{
int i;
// 重複チェック
for (i = 0; i < res_i; i++)
return;
// 重複無ければ蓄える
}
// 文字列の右n桁を左にスライド
void narabe(char *d, int n)
{
char c;
if (n <= 1) {
kekka_shori(d);
return;
}
for (j = 0; j < n; j++) {
narabe(d, n - 1);
c = d[len - n];
for (i = 0; i < n - 1; i++)
d[len - n + i] = d[len - n + i + 1];
d[len - n + i] = c;
}
}
int main()
{
char d[] = "aabc";
int i;
// 初期化
res_i = 0;
// 並べ替えデータ作成(重複チェック)
// 表示
for (i = 0; i < res_i; i++) {
}
return 0;
}
Ly8gaHR0cDovL2kuLi5jb250ZW50LWF2YWlsYWJsZS10by1hdXRob3Itb25seS4uLmUuY29tL2NKTFUwTwovLyAg5Lim44G55pu/44GICi8vICDph43opIfpnZ7ooajnpLoKCiNpbmNsdWRlPHN0ZGlvLmg+CiNpbmNsdWRlPHN0cmluZy5oPgoKY2hhciByZXNfZFs0ICogMyAqIDIgKiAxXVs1XTsgICAvLyDntZDmnpzosq/olLUKaW50IHJlc19pOyAgICAgICAgICAgICAgICAgICAgICAvLyDntZDmnpzlgIvmlbAKCi8vIOS4puOBueabv+OBiOe1kOaenOWHpueQhgp2b2lkIGtla2thX3Nob3JpKGNoYXIgKnApCnsKICAgIGludCBpOwogICAgLy8g6YeN6KSH44OB44Kn44OD44KvCiAgICBmb3IgKGkgPSAwOyBpIDwgcmVzX2k7IGkrKykKICAgICAgICBpZiAoMCA9PSBzdHJjbXAocmVzX2RbaV0sIHApKQogICAgICAgICAgICByZXR1cm47CiAgICAvLyDph43opIfnhKHjgZHjgozjgbDok4TjgYjjgosKICAgIHN0cmNweShyZXNfZFtyZXNfaSsrXSwgcCk7Cn0KCi8vIOaWh+Wtl+WIl+OBruWPs27moYHjgpLlt6bjgavjgrnjg6njgqTjg4kKdm9pZCBuYXJhYmUoY2hhciAqZCwgaW50IG4pCnsKICAgIGludCBpLCBqLCBsZW4gPSBzdHJsZW4oZCk7CiAgICBjaGFyIGM7CgogICAgaWYgKG4gPD0gMSkgewogICAgICAgIGtla2thX3Nob3JpKGQpOwogICAgICAgIHJldHVybjsKICAgIH0KICAgIGZvciAoaiA9IDA7IGogPCBuOyBqKyspIHsKICAgICAgICBuYXJhYmUoZCwgbiAtIDEpOwogICAgICAgIGMgPSBkW2xlbiAtIG5dOwogICAgICAgIGZvciAoaSA9IDA7IGkgPCBuIC0gMTsgaSsrKQogICAgICAgICAgICBkW2xlbiAtIG4gKyBpXSA9IGRbbGVuIC0gbiArIGkgKyAxXTsKICAgICAgICBkW2xlbiAtIG4gKyBpXSA9IGM7CiAgICB9Cn0KCmludCBtYWluKCkKewogICAgY2hhciBkW10gPSAiYWFiYyI7CiAgICBpbnQgaTsKCiAgICAvLyDliJ3mnJ/ljJYKICAgIHJlc19pID0gMDsKICAgIC8vIOS4puOBueabv+OBiOODh+ODvOOCv+S9nOaIkCjph43opIfjg4Hjgqfjg4Pjgq8pCiAgICBuYXJhYmUoZCwgc3RybGVuKGQpKTsKICAgIC8vIOihqOekugogICAgZm9yIChpID0gMDsgaSA8IHJlc19pOyBpKyspIHsKICAgICAgICBwcmludGYoIiVzXG4iLCByZXNfZFtpXSk7CiAgICB9CgogICAgcmV0dXJuIDA7Cn0=