結果
| 問題 |
No.2728 Grid Expansion
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-04-19 21:22:42 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 370 bytes |
| コンパイル時間 | 1,956 ms |
| コンパイル使用メモリ | 191,184 KB |
| 最終ジャッジ日時 | 2025-02-21 03:31:06 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 15 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:12:8: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
12 | scanf("%d%d", &n, &m);
| ~~~~~^~~~~~~~~~~~~~~~
main.cpp:14:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
14 | scanf("%s", s[i]);
| ~~~~~^~~~~~~~~~~~
ソースコード
#include <bits/stdc++.h>
typedef long long LL;
const int N = 100 + 7;
int n, m;
char s[N][N], t[N][N];
int main() {
scanf("%d%d", &n, &m);
for(int i = 0; i < n; ++i)
scanf("%s", s[i]);
for(int i = 0; i < n * m; ++i)
for(int j = 0; j < n * m; ++j)
t[i][j] = s[i / m][j / m];
for(int i = 0; i < n * m; ++i)
puts(t[i]);
return 0;
}