피너클의 it공부방
백준 11945 뜨거운 붕어빵 (c++) : 피너클 본문
728x90
반응형
https://www.acmicpc.net/problem/11945
11945번: 뜨거운 붕어빵
입력으로 주어지는 각 행을 반전시켜서 출력하면 됩니다. 입력의 1행 1열은 출력의 1행 M열로, 입력의 1행 2열은 출력의 1행 M-1열로 … 입력의 1행 M열은 출력의 1행 1열로 … 입력의 N행 M열은 출력
www.acmicpc.net
간단한 구현문제다.
#include <iostream>
#include <string>
using namespace std;
int n, m;
string str[10];
int main()
{
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
cin >> n >> m;
for (int i = 0; i < n; i++) cin >> str[i];
for (int i = 0; i < n; i++) {
for (int j = m - 1; j >= 0; j--) cout << str[i][j];
cout << endl;
}
}
전체코드다.
728x90
반응형
'백준' 카테고리의 다른 글
백준 11365 !밀비 급일 (c++) : 피너클 (0) | 2022.06.11 |
---|---|
백준 7662 이중 우선순위 큐 (c++) : 피너클 (0) | 2022.06.10 |
백준 9466 텀 프로젝트 (c++) : 피너클 (0) | 2022.06.09 |
백준 11943 파일 옮기기 (c++) : 피너클 (0) | 2022.06.09 |
백준 13866 팀 나누기 (c++) : 피너클 (0) | 2022.06.08 |
Comments