题目描述
blablabla
样例
#include <iostream>
using namespace std;
#include <cmath>
#include <cstring>
int main(){
int n;
cin >> n;
int a[n];
int b[n];
for (int i = 0; i < n; i++){
cin >> a[i];
}
memcpy(b, a, sizeof a);
for (int i = 0; i < n; i++){
for (int j = 0; j < n - i - 1; j++){
if(a[j] > a[j + 1]){
swap(a[j],a[j+1]);
}
}
}
cout << "Minimum value: " << a[0] << endl;
int ant = 0;
for (int i = 0; i < n; i++){
if (b[i] == a[0]){
ant = i;
break;
}
}
cout << "Position: " << ant << endl;
return 0;
}