結果

問題 No.2728 Grid Expansion
ユーザー kino0402kino0402
提出日時 2024-04-19 21:32:13
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 3,401 bytes
コンパイル時間 3,724 ms
コンパイル使用メモリ 233,472 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-04-19 21:32:27
合計ジャッジ時間 4,308 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,812 KB
testcase_01 AC 2 ms
6,940 KB
testcase_02 AC 2 ms
6,940 KB
testcase_03 AC 2 ms
6,940 KB
testcase_04 AC 1 ms
6,940 KB
testcase_05 AC 2 ms
6,944 KB
testcase_06 AC 2 ms
6,944 KB
testcase_07 AC 2 ms
6,944 KB
testcase_08 AC 1 ms
6,940 KB
testcase_09 AC 1 ms
6,940 KB
testcase_10 AC 2 ms
6,940 KB
testcase_11 AC 1 ms
6,940 KB
testcase_12 AC 2 ms
6,944 KB
testcase_13 AC 2 ms
6,944 KB
testcase_14 AC 2 ms
6,944 KB
testcase_15 AC 2 ms
6,940 KB
testcase_16 AC 2 ms
6,944 KB
testcase_17 AC 1 ms
6,940 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:115:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
  115 | main(){
      | ^~~~

ソースコード

diff #

#include<bits/stdc++.h>
#include<atcoder/all> 
using namespace std;
using namespace atcoder;
using ll=long long;
#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#define speedup std::cin.tie(0)->sync_with_stdio(0);
#define _GLIBCXX_DEBUG //優先度付きキュー使って時間制限厳しい場合コメントアウト
#define int ll
#define int_max 2147483647
#define int_min -2147483647
#define uint_max 4294967295
#define ll_max 9223372036854775807
#define ll_min -9223372036854775807
#define ull_max 18446744073709551615
#define rep(i,n) for(ll i=0;i<(n);i++)
#define reps(i,n) for(ll i=1;i<=(n);i++)
#define REP(i,j,n) for(ll i=(j);i<(n);i++)
#define all(a) (a).begin(), (a).end()
#define veci vector<int>
#define veci2 vector<vector<int>>
//veci2 A(a,veci(b))
#define vecll vector<ll>
#define vecll2 vector<vector<ll>>
#define vecst vector<string>
#define repc(i,n,A) rep(i,n)cin>>A[i]
#define repc2(i,n,A,B) rep(i,n)cin>>A[i]>>B[i]
#define repc2vec(i,j,a,b,A) rep(i,a)rep(j,b)cin>>A[i][j]
#define repair(i,n,A) rep(i,n)cin>>A[i].F>>A[i].S>>
#define ST(A) sort(all(A))
#define RV(A) reverse(all(A));
#define pb push_back
#define mp make_pair
#define Endl endl
#define F first
#define S second
#define yes(b) ((b)?"yes":"no")
#define Yes(b) ((b)?"Yes":"No")
#define YES(b) ((b)?"YES":"NO")
#define TA(b) ((b)?"Takahashi":"Aoki")
#define AB(b) ((b)?"Alice":"Bob")
template <typename T> inline T gcd(T a,T b) {return (b==0)?a:gcd(b,a%b);}//最大公約数
template <typename T> inline T lcm(T a, T b) {return (a*b)/gcd(a,b);}//最小公倍数
veci dx={-1,0,1,-1,1,-1,0,1};
veci dy={-1,-1,-1,0,0,1,1,1};
veci DX={-1,1,0,0};
veci DY={0,0,-1,1};
ll mod=998244353;
//mod=1000000007;
//ここからコード入力(関数使用時用)

//関数
/*ll nibutan(ll K){
  //二分探索 a=要素数 [m]の前配列名
    ll ng=-1;
    ll ok=a;
    while(ok-ng>1){
        ll m=(ng+ok)/2;
        if([m]>K)ok=m;
        else ng=m;
    }
    return ok;
}*/
vector<pair<int,int>>soinsuubunkai(int N){
  vector<pair<int,int>>res;
  for(int a=2;a*a<=N;a++){
    if(N%a!=0)continue;
    int ex=0; // 指数
    // 割れる限り割り続ける
    while(N%a==0){
      ex++;
      N/=a;
    }
    // その結果を push
    res.pb({a, ex});
  }
    // 最後に残った数について
  if(N!=1)res.pb({N,1});
  return res;
  //N=6 {2,1} {3,1}(2^1+3^1)のようになる autoで受け取ろう
  
}
/*//コンビネーション
ll C_MAX=510000;
vecll fac(C_MAX);
vecll finv(C_MAX);
vecll inv(C_MAX);
// テーブルを作る前処理
void COMinit(){
  fac[0]=fac[1]=1;
  finv[0]=finv[1]=1;
  inv[1]=1;
  REP(i,2,C_MAX){
    fac[i]=fac[i-1]*i%mod;
    inv[i]=mod-inv[mod%i]*(mod/i)%mod;
    finv[i]=finv[i-1]*inv[i]%mod;
  }
}

//二項係数計算
ll COM(ll n,ll k){
  if(n<k)return 0;
  if(n<0||k<0)return 0;
  return fac[n]*(finv[k]*finv[n-k]%mod)%mod;
}
void kitaitimod(ll a,ll b){
  //a/b
  ll denominator=inv_mod(b,mod);
  cout<<a*denominator%mod<<endl;
  return;
}*/
//ここからコード入力(   ´・ω・`    )
main(){
  ll A,B;
  cin>>A>>B;
  vector<string>C(A);
  repc(i,A,C);
  vector<vector<char>>D((A*B),vector<char>(A*B));
  rep(i,A){
    rep(j,A){
      rep(k,B){
        rep(l,B){
          D[i*B+k][j*B+l]=C[i][j];
        }
      }
    }
  }
  rep(i,A*B){
    rep(j,A*B){
      cout<<D[i][j];
    }
    cout<<endl;
  }
}
0