#include <bits/stdc++.h>
using namespace std;
int main() {
list<int>q1;
list<int>q2;
int n, m, s;
for (int i = 1; i > 0; i++) {
cin >> n;
if (n == -999) {
s = i;
break;
}
q1.push_back(n);
q2.push_back(n);
}
q2.sort() ;
m = q2.back() ;
for (int i = 1; i < s; i++) {
if (q1.front() == m) {
cout << "-25" << " ";
cout << q1.front() << " ";
q1.pop_front() ;
cout << "-25" << " ";
continue;
}
cout << q1.front() << " " ;
q1.pop_front() ;
}
return 0;
}
全部回复 共 0 条
还没有人回复。往下写第一条。
发表回复
登录后即可回复本帖,与出题人和同学一起讨论。
登录