/***
Md. Namzul Hasan
Shahjalal University of Science & Technology,Sylhet.
hasan08sust@gmail.com
***/
#include<bits/stdc++.h>
using namespace std ;
typedef long long ll ;
typedef int in ;
typedef unsigned long long ull ;
const double pi = 2*acos(0) ;
#define maxi 40000
#define pf printf
#define sc scanf
#define pb push_back
#define MEM(x,y) (memset((x),(y),sizeof(x)))
#define MIN(x,y) ((x) < (y) ? (x) : (y))
#define MAX(x,y) ((x) > (y) ? (x) : (y))
#define load(array,size) for(int i=0 ; i<size ; i++) cin>>array[i] ;
#define new_line pf("\n")
#define clear_data(array) memset(array,0,sizeof(array))
#define highest_int 2147483647
int main()
{
char ch[101][101] ;
int cnt =0 ;
int mx =0 ;
int ln[101] ;
while(gets(ch[++cnt]))
{
ln[cnt] = strlen(ch[cnt]) ;
if(ln[cnt]>mx)
mx =ln[cnt] ;
if(ln[cnt]==0)
break ;
}
int i,j,l ;
//char str[101] ;
string str ;
for(i=0 ; i<mx ; i++)
{
for(j=cnt-1; j>=1 ; j--)
{
if(ln[j]>i)
pf("%c",ch[j][i]) ;
else
pf(" ") ;
}
pf("\n") ;
}
return 0;
}
Md. Namzul Hasan
Shahjalal University of Science & Technology,Sylhet.
hasan08sust@gmail.com
***/
#include<bits/stdc++.h>
using namespace std ;
typedef long long ll ;
typedef int in ;
typedef unsigned long long ull ;
const double pi = 2*acos(0) ;
#define maxi 40000
#define pf printf
#define sc scanf
#define pb push_back
#define MEM(x,y) (memset((x),(y),sizeof(x)))
#define MIN(x,y) ((x) < (y) ? (x) : (y))
#define MAX(x,y) ((x) > (y) ? (x) : (y))
#define load(array,size) for(int i=0 ; i<size ; i++) cin>>array[i] ;
#define new_line pf("\n")
#define clear_data(array) memset(array,0,sizeof(array))
#define highest_int 2147483647
int main()
{
char ch[101][101] ;
int cnt =0 ;
int mx =0 ;
int ln[101] ;
while(gets(ch[++cnt]))
{
ln[cnt] = strlen(ch[cnt]) ;
if(ln[cnt]>mx)
mx =ln[cnt] ;
if(ln[cnt]==0)
break ;
}
int i,j,l ;
//char str[101] ;
string str ;
for(i=0 ; i<mx ; i++)
{
for(j=cnt-1; j>=1 ; j--)
{
if(ln[j]>i)
pf("%c",ch[j][i]) ;
else
pf(" ") ;
}
pf("\n") ;
}
return 0;
}
No comments:
Post a Comment