結果
| 問題 |
No.2728 Grid Expansion
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-04-19 21:22:43 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 44 ms / 2,000 ms |
| コード長 | 777 bytes |
| コンパイル時間 | 1,929 ms |
| コンパイル使用メモリ | 193,300 KB |
| 最終ジャッジ日時 | 2025-02-21 03:31:15 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 15 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
char board[10][10];
char res[100][100];
int n,k;
int main(void)
{
cin.tie(0);
ios::sync_with_stdio(false);
cin >> n >> k;
for(int i=0;i<n;i++)
{
for(int j=0;j<n;j++)
{
cin >> board[i][j];
}
}
for(int i=0;i<n;i++)
{
for(int j=0;j<n;j++)
{
int y = i*k;
int x = j*k;
for(int a=y;a<y+k;a++)
{
for(int b=x;b<x+k;b++)
{
res[a][b] = board[i][j];
}
}
}
}
for(int i=0;i<n*k;i++)
{
for(int j=0;j<n*k;j++)
{
cout << res[i][j];
}
cout << '\n';
}
return 0;
}