|
|
back to boardWA#2 TEST. WHATS WRONG??????? #include <iostream.h> int main() { int N,M,i,t; cin>>N>>M; int *mas=new int [N]; int *mas2=new int [N]; for(i=1;i<=N;i++) cin>>mas[i]; for(i=1;i<=N;i++) { t=i+M; if(t>N) { t-=N; } mas2[t]=mas[i]; } if(N>10) { for(i=3;i<=N;i++) cout<<mas2[i]; } else { for(i=1;i<=N;i++) cout<<mas2[i]; } return 0; } Re: WA#2 TEST. WHATS WRONG??????? If you wnat to use cin and cout you must write using namespace std; |
|
|