Skip to content

Instantly share code, notes, and snippets.

@nagy3n
Last active August 29, 2015 14:27
Show Gist options
  • Save nagy3n/aa65ade8bf6110b1f6fc to your computer and use it in GitHub Desktop.
Save nagy3n/aa65ade8bf6110b1f6fc to your computer and use it in GitHub Desktop.
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
/**
* Auto-generated code below aims at helping you parse
* the standard input according to the problem statement.
**/
int main()
{
int L;
scanf("%d", &L); fgetc(stdin);
int H;
scanf("%d", &H); fgetc(stdin);
char T[256];
fgets(T,256,stdin);
int x=strlen(T);
char ROW[H][512];
for (int i = 0; i < H; i++) {
for(int j=0;j<L*26+5;j++)
{
scanf("%c",&ROW[i][j]);
}
}
for(int i=0;i<x;i++)
{
T[i]=toupper(T[i]);
if(T[i]=='@')
T[i]='A';
T[i]-=65;
}
for(int j=0;j<H;j++)
{
for(int i=0;i<x;i++)
{
int acs= T[i]*L;
for(int k=0;k<L;k++)
{
printf("%c",ROW[j][acs+k]);
}
}
printf("\n");
}
// Write an action using printf(). DON'T FORGET THE TRAILING \n
// To debug: fprintf(stderr, "Debug messages...\n");
return 0;
}
@nagy3n
Copy link
Author

nagy3n commented Aug 9, 2015

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment