#include <stdio.h>
int main(void) {
int i,n,m,w ;
int *p;
int arr[n];
p = &arr[0];
for(i=0;i<n;i++){
*(p+i)=m;
}
m = arr[0];
for(i=0;i<n;i++){
if(*(p+i)>m){
m=*(p+i);
}
}
w = arr[0];
for(i=0;i<n;i++){
if(*(p+i)<w){
w=*(p+i);
}
}
printf("Max value: %d, indexes:",m
); for(i=0;i<n;i++){
if(*(p+i)==m){
}
}
printf("\nMax value: %d, indexes:",w
); for(i=0;i<n;i++){
if(*(p+i)==w){
}
}
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgbWFpbih2b2lkKSB7CglpbnQgaSxuLG0sdyA7CglpbnQgKnA7CglzY2FuZigiJWQiLCZuKTsKCWludCBhcnJbbl07CglwID0gJmFyclswXTsKCWZvcihpPTA7aTxuO2krKyl7CgkJc2NhbmYoIiVkIiwmbSk7CgkJKihwK2kpPW07Cgl9CgltID0gYXJyWzBdOwoJZm9yKGk9MDtpPG47aSsrKXsKCQlpZigqKHAraSk+bSl7CgkJCW09KihwK2kpOwoJCX0KCX0KCXcgPSBhcnJbMF07Cglmb3IoaT0wO2k8bjtpKyspewoJCWlmKCoocCtpKTx3KXsKCQkJdz0qKHAraSk7CgkJfQoJfQoJcHJpbnRmKCJNYXggdmFsdWU6ICVkLCBpbmRleGVzOiIsbSk7Cglmb3IoaT0wO2k8bjtpKyspewoJCWlmKCoocCtpKT09bSl7CgkJCXByaW50ZigiICVkIixpKTsKCQl9Cgl9CglwcmludGYoIlxuTWF4IHZhbHVlOiAlZCwgaW5kZXhlczoiLHcpOwoJZm9yKGk9MDtpPG47aSsrKXsKCQlpZigqKHAraSk9PXcpewoJCQlwcmludGYoIiAlZCIsaSk7CgkJfQoJfQoJcmV0dXJuIDA7Cn0K