ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1370. Magician

WA#2 TEST. WHATS WRONG???????
Posted by Master of C++ 25 Mar 2007 19:05
#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???????
Posted by Александр 17 Oct 2012 19:17
If you wnat to use cin and cout you must write  using namespace std;