結果
| 問題 |
No.565 回転拡大
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-09-08 22:35:35 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 3,344 bytes |
| コンパイル時間 | 1,303 ms |
| コンパイル使用メモリ | 158,704 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-07 06:21:31 |
| 合計ジャッジ時間 | 2,276 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 30 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:98:46: warning: iteration 10 invokes undefined behavior [-Waggressive-loop-optimizations]
98 | tmp[i][j] = in[9-j][i];
| ~~~~~~~~~^
main.cpp:45:31: note: within this loop
45 | #define rep(i,a) for(int i=0;i<a;i++)
| ^
main.cpp:97:27: note: in expansion of macro ‘rep’
97 | rep(i, 11)rep(j, 11) {
| ^~~
ソースコード
#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;
#define dprint(Exp,...) if(Exp){fprintf(stderr, __VA_ARGS__);}
#define printe(...) fprintf(stderr, __VA_ARGS__);
#define PrtExp(_Exp) cerr<< #_Exp <<" = "<< (_Exp)
#define PrtExpN(_Exp) cerr<< #_Exp <<" = "<< (_Exp) <<"\n"
#define SINT(n) scanf("%d",&n)
#define SINT2(n,m) scanf("%d %d",&n,&m)
#define SINT3(n,m,o) scanf("%d %d %d",&n,&m,&o)
#define SINT4(n,m,o,p) scanf("%d %d %d %d",&n,&m,&o,&p)
#define SINT5(n,m,o,p,q) scanf("%d %d %d %d %d",&n,&m,&o,&p,&q)
#define SLL(n) scanf("%lld",&n)
#define SLL2(n,m) scanf("%lld %lld",&n,&m)
#define SLL3(n,m,o) scanf("%lld %lld %lld",&n,&m,&o)
#define SST(s) scanf("%s",s)
#define SCH(c) scanf("%c",&c)
#define GC() getchar()
#define PINT(n) printf("%d",(int)(n))
#define PINT2(n,m) printf("%d %d",(int)(n),(int)(m))
#define PINT3(n,m,l) printf("%d %d %d",(int)(n),(int)(m),(int)(l))
#define PLL(n) printf("%lld",(long long)(n))
#define PST(s) printf("%s",(s))
#define PCH(s) printf("%c",(s))
#define PINTN(n) printf("%d\n",(int)(n))
#define PINT2N(n,m) printf("%d %d\n",(int)(n),(int)(m))
#define PINT3N(n,m,l) printf("%d %d %d\n",(int)(n),(int)(m),(int)(l))
#define PLLN(n) printf("%lld\n",(long long)(n))
#define PSTN(s) printf("%s\n",(s))
#define PCHN(s) printf("%c\n",(s))
#define PSP() printf(" ")
#define PN() printf("\n")
#define PC(c) putchar(c)
#define CSP (' ')
#define SN ("\n")
#define rep(i,a) for(int i=0;i<a;i++)
#define reP(i,a) for(int i=0;i<=a;i++)
#define Rep(i,a) for(int i=a-1;i>=0;i--)
#define ReP(i,a) for(int i=a;i>=0;i--)
#define rEp(i,a) for(i=0;i<a;i++)
#define rEP(i,a) for(i=0;i<=a;i++)
#define REp(i,a) for(i=a-1;i>=0;i--)
#define REP(i,a) for(i=a;i>=0;i--)
#define repft(i,a,b) for(int i=a;i<b;i++)
#define repfT(i,a,b) for(int i=a;i<=b;i++)
#define Repft(i,a,b) for(int i=a-1;i>=b;i--)
#define RepfT(i,a,b) for(int i=a;i>=b;i--)
#define foreach(a,it) for(auto it = a.begin(); it != a.end(); ++it)
#define FILL(a,v) fill(begin(a),end(a), v)
#define FILL0(a) memset(a,0,sizeof(a))
#define FILL1(a) memset(a,-1,sizeof(a))
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> Pi;
typedef pair<ll, ll> Pll;
const int INF = 0x2aaaaaaa; // 715,827,882
const ll INFLL = 0x1f1f1f1f1f1f1f1fLL;//2,242,545,357,980,376,863
template <class A, class B> inline ostream& operator<<(ostream& st, const pair<A, B>& P) { return st << "(" << P.first << "," << P.second << ")"; };
template <class A, class B> inline pair<A, B> operator+(const pair<A, B>& P, const pair<A, B>& Q) { return pair<A, B>(P.first + Q.first, P.second + Q.second); };
template <class A, class B> inline pair<A, B> operator-(const pair<A, B>& P, const pair<A, B>& Q) { return pair<A, B>(P.first - Q.first, P.second - Q.second); };
#define fs first
#define sc second
char in[11][11];
char tmp[11][11];
int main() {
int r, k, h, w;
cin >> r >> k >> h >> w;
FILL0(in);
rep(i, h) {
cin >> in[i];
}
rep(_, r / 90) {
rep(i, 11)rep(j, 11) {
tmp[i][j] = in[9-j][i];
}
rep(i, 11)rep(j, 11) in[i][j] = tmp[i][j];
}
/*
rep(i, 10) {
rep(j, 10) cout << (in[i][j] == 0 ? ' ' : in[i][j]) << " ";
cout << endl;
}
*/
rep(i, 11) rep(_, k) {
bool f = false;
rep(j, 11) {
if (in[i][j] == 0)continue;
rep(_, k) cout << in[i][j];
f = true;
}
if(f)cout << endl;
}
}