Subscribe Us

Responsive Advertisement

Advertisement

URI Online Judge | 1516 Image solution in cpp

 

uri 1516 solution in cpp

by ujjal roy




#include<bits/stdc++.h>

using namespace std;

main()

{

    int a,b;

    while(1)

    {

        cin>>a>>b;

        if(a==0&&b==0) break;

        else

        {

            int i,j,k,l;

            vector<string> v;

            for(i=0;i<a;i++)

            {

                string s;

                cin>>s;

                v.push_back(s);

            }


            int m,n,h,w;

            cin>>m>>n;

            h=m/a;

            w=n/b;


            for(i=0;i<a;i++)

            {

                string s1=v[i];

                for(j=0;j<h;j++)

                {

                    for(k=0;k<s1.size();k++)

                    {

                        for(l=0;l<w;l++) cout<<s1[k];

                    }

                    cout<<endl;

                }

            }


            cout<<endl;

        }

    }

    return 0;

}


Post a Comment

0 Comments