#include <stdio.h>
void swap(int *a, int *b) {
int temp = *a;
*a = *b;
*b = temp;
}
void sort(int *x, int *y) {
if (*x < *y) {
swap(x, y);
}
}
int main() {
int x, y;
sort(&x, &y);
printf("降順に並べ替えた結果: x = %d, y = %d\n", x
, y
);
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+Cgp2b2lkIHN3YXAoaW50ICphLCBpbnQgKmIpIHsKICAgIGludCB0ZW1wID0gKmE7CiAgICAqYSA9ICpiOwogICAgKmIgPSB0ZW1wOwp9Cgp2b2lkIHNvcnQoaW50ICp4LCBpbnQgKnkpIHsKICAgIGlmICgqeCA8ICp5KSB7CiAgICAgICAgc3dhcCh4LCB5KTsKICAgIH0KfQoKaW50IG1haW4oKSB7CiAgICBpbnQgeCwgeTsKCiAgICBwcmludGYoInjjga7lgKTjgpLlhaXlipvjgZfjgabjgY/jgaDjgZXjgYQ6ICIpOwogICAgc2NhbmYoIiVkIiwgJngpOwogICAgcHJpbnRmKCJ544Gu5YCk44KS5YWl5Yqb44GX44Gm44GP44Gg44GV44GEOiAiKTsKICAgIHNjYW5mKCIlZCIsICZ5KTsKCiAgICBzb3J0KCZ4LCAmeSk7CgogICAgcHJpbnRmKCLpmY3poIbjgavkuKbjgbnmm7/jgYjjgZ/ntZDmnpw6IHggPSAlZCwgeSA9ICVkXG4iLCB4LCB5KTsKCiAgICByZXR1cm4gMDsKfQ==