// http://i...content-available-to-author-only...e.com/tGdfKa
// 並べ替え
// 重複非表示
#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;
}
Ly8gaHR0cDovL2kuLi5jb250ZW50LWF2YWlsYWJsZS10by1hdXRob3Itb25seS4uLmUuY29tL3RHZGZLYQovLyAg5Lim44G55pu/44GICi8vICDph43opIfpnZ7ooajnpLoKCiNpbmNsdWRlPHN0ZGlvLmg+CiNpbmNsdWRlPHN0cmluZy5oPgoKY2hhciByZXNfZFs0ICogMyAqIDIgKiAxXVs1XTsgICAvLyDntZDmnpzosq/olLUKaW50IHJlc19pOyAgICAgICAgICAgICAgICAgICAgICAvLyDntZDmnpzlgIvmlbAKCi8vIOS4puOBueabv+OBiOe1kOaenOWHpueQhgp2b2lkIGtla2thX3Nob3JpKGNoYXIgKnApCnsKICAgIGludCBpOwogICAgLy8g6YeN6KSH44OB44Kn44OD44KvCiAgICBmb3IgKGkgPSAwOyBpIDw9IHJlc19pOyBpKyspCiAgICAgICAgaWYgKDAgPT0gc3RyY21wKHJlc19kW2ldLCBwKSkKICAgICAgICAgICAgcmV0dXJuOwogICAgLy8g6YeN6KSH54Sh44GR44KM44Gw6JOE44GI44KLCiAgICBzdHJjcHkocmVzX2RbcmVzX2krK10sIHApOwp9CgovLyDmloflrZfliJfjga7lj7Nu5qGB44KS5bem44Gr44K544Op44Kk44OJCnZvaWQgbmFyYWJlKGNoYXIgKmQsIGludCBuKQp7CiAgICBpbnQgaSwgaiwgbGVuID0gc3RybGVuKGQpOwogICAgY2hhciBjOwoKICAgIGlmIChuIDw9IDEpIHsKICAgICAgICBrZWtrYV9zaG9yaShkKTsKICAgICAgICByZXR1cm47CiAgICB9CiAgICBmb3IgKGogPSAwOyBqIDwgbjsgaisrKSB7CiAgICAgICAgbmFyYWJlKGQsIG4gLSAxKTsKICAgICAgICBjID0gZFtsZW4gLSBuXTsKICAgICAgICBmb3IgKGkgPSAwOyBpIDwgbiAtIDE7IGkrKykKICAgICAgICAgICAgZFtsZW4gLSBuICsgaV0gPSBkW2xlbiAtIG4gKyBpICsgMV07CiAgICAgICAgZFtsZW4gLSBuICsgaV0gPSBjOwogICAgfQp9CgppbnQgbWFpbigpCnsKICAgIGNoYXIgZFtdID0gImFhYmMiOwogICAgaW50IGk7CgogICAgLy8g5Yid5pyf5YyWCiAgICByZXNfaSA9IDA7CiAgICAvLyDkuKbjgbnmm7/jgYjjg4fjg7zjgr/kvZzmiJAo6YeN6KSH44OB44Kn44OD44KvKQogICAgbmFyYWJlKGQsIHN0cmxlbihkKSk7CiAgICAvLyDooajnpLoKICAgIGZvciAoaSA9IDA7IGkgPCByZXNfaTsgaSsrKSB7CiAgICAgICAgcHJpbnRmKCIlc1xuIiwgcmVzX2RbaV0pOwogICAgfQoKICAgIHJldHVybiAwOwp9