|
|
вернуться в форумWA on test 4 this is my program : #include<iostream> using namespace std; int main() { int n; cin>>n; int i; for(i=0;i<n/2;i++) cout<<i+1<<" "<<n-i<<" "; if(n%2!=0) cout<<((int)n/2)+1<<" "; cout<<endl; cout<<"1 "; for(i=3;i<n;i+=2) cout<<i<<" "; int p=n; if(p%2!=0) { p-=1; cout<<n<<" "; } for(p=p;p>1;p-=2) cout<<p<<" "; return 0; } I think its right but I get WA on test 4 anybody knows whats wrong ? |
|
|