AOJ_0133
高校生活というものが分かってきた
問題
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0133
解法
やるだけ
#include <cstdio> #include <algorithm> using namespace std; char a[8][8]; void turn(){ char b[8][8]; for(int w = 0; w < 8; w++){ for(int h = 7; h >= 0; h--){ b[w][7 - h] = a[h][w]; } } for(int i = 0; i < 8; i++){ for(int j = 0; j < 8; j++){ printf("%c", b[i][j]); a[i][j] = b[i][j]; } puts(""); } } int main(){ char c; for(int h = 0; h < 8; h++){ for(int w = 0; w < 8; w++){ scanf("%c", &a[h][w]); } scanf("%c", &c); } printf("90\n"); turn(); printf("180\n"); turn(); printf("270\n"); turn(); return 0; }