int main(){
int n;
while(cin >> n){
cal(n);
cout << endl;
}
return 0;
}
void cal(int n){
int temp[100]={0}; int i,j=0;
int flag = 0;
for(i=0; i> temp[j];
if(flag==0&&temp[j]>=2&&temp[j]<=4){flag=1;temp[j]=1;temp[++j]=1;}j++;}if(flag==0)cout<<"Deep Dark Fantasy of ECNU";else{i=0;while(temp[i]!=0){cout<<temp[i]<<' ';i++;}}
include
include
int main()
{
int N,n,m;
while(scanf(“%d”,&N)!=EOF)
{
int i;
int a[N];
for(i=0; i<N; i++)
{
scanf(“%d”,&a[i]);
}
n=0;
for(i=0; i=2&&a[i]<=4)
{
a[i]=1;
n=1;
m=i;
}
if(n==1)break;
}
if(n==1)
{
for(i=0; i<N; i++)
{
if(i!=m)printf(” %d”,a[i]);
if(i==m)printf(” 1 %d”,a[i]);
}
printf(“\n”);
}
if(n==0)printf(“Deep Dark Fantasy of ECNU\n”);
}
}
配图不老实啊
这道题就是灌来的水?
include
include
using namespace std;
void cal(int n);
int main(){
int n;
while(cin >> n){
cal(n);
cout << endl;
}
return 0;
}
void cal(int n){
int temp[100]={0}; int i,j=0;
int flag = 0;
for(i=0; i> temp[j];
}