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;
}
0 Comments