#include <stdio.h>
void swap(int *x,int *y);
int main(void) {
int data1[5]={1,2,3,4,5};
int data2[5]={6,7,8,9,10};
swap(data1,data2);
for(int i=0;i<5;i++){
}
return 0;
}
void swap(int *x,int *y){
int *w;
for(int i=0;i<5;i++){
*w=x[i];
x[i]=y[i];
y[i]=*w;
}
}
I2luY2x1ZGUgPHN0ZGlvLmg+Cgp2b2lkIHN3YXAoaW50ICp4LGludCAqeSk7CgppbnQgbWFpbih2b2lkKSB7CiAgIGludCBkYXRhMVs1XT17MSwyLDMsNCw1fTsKICAgaW50IGRhdGEyWzVdPXs2LDcsOCw5LDEwfTsKICAgc3dhcChkYXRhMSxkYXRhMik7CiAgIAogICBmb3IoaW50IGk9MDtpPDU7aSsrKXsKICAgIAlwcmludGYoIiVkIixkYXRhMVtpXSk7CiAgICAJcHJpbnRmKCIlZFxuIixkYXRhMltpXSk7CiAgIH0KCXJldHVybiAwOwp9CnZvaWQgc3dhcChpbnQgKngsaW50ICp5KXsKCWludCAqdzsKCWZvcihpbnQgaT0wO2k8NTtpKyspewoJKnc9eFtpXTsKCXhbaV09eVtpXTsKCXlbaV09Knc7Cgl9Cn0=