Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Problem D
- #include <stdio.h>
- int main(){
- int tc,r,c;
- char in[10000];
- scanf("%d",&tc);
- for(int i=1;i<=tc;i++){
- int index = 0;
- scanf("%s",in);
- scanf("%d %d",&r,&c);
- printf("Case #%d:\n",i);
- for(int j=0;j<r;j++){
- for(int k=0;k<c;k++){
- if(k!=c-1){
- printf("%c ",in[index]);
- }else{
- printf("%c\n",in[index]);
- }
- index++;
- }
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement