페이지

10219번: Meats On The Grill

https://www.acmicpc.net/problem/10219


$O(thw)$

좌우대칭으로 출력한다.


#include<cstdio>
int t, h, w;
char s[12];
int main() {
    scanf("%d", &t);
    while (t--) {
        scanf("%d %d", &h, &w);
        for (int i = 0; i < h; i++) {
            scanf("%s", s);
            for (int j = w - 1; j >= 0; j--) printf("%c", s[j]);
            puts("");
        }
    }
    return 0;
}

댓글 없음 :

댓글 쓰기