提出 #74703168


ソースコード 拡げる

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i,a,b) for(ll i = (a); i < (ll)(b); i++)
#define all(x) (x).begin(), (x).end()
#define fore(x, a) for(auto &x : a)
#define chmin(x,y) x = min(x,y)
#define chmax(x,y) x = max(x,y)
const ll INF = 2e18;

#ifdef LOCAL
#define _GLIBCXX_DEBUG
#endif

template<class T> using vc = vector<T>;
template<class T> using vv = vc<vc<T>>;
using vl = vc<ll>; using vvl = vv<ll>;
using vs = vc<string>;
//vl a(n);  vvl b(h,vl(w));
using P = pair<ll,ll>;//vector<P> a;
template<class T> using pq = priority_queue<T,vector<T>>;
template<class T> using pq_g = priority_queue<T,vector<T>,greater<T>>;

template<class T>
istream& operator>>(istream& is, vector<T>& v){
    for(T& x : v) is >> x;
    return is;
}

void YN(bool condition) {
    if (condition) {
        cout << "Yes\n";
    } else {
        cout << "No\n";
    }
}
template<typename T>
long long sz(const T& x) {
    return (long long)x.size();
}

int main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);

    ll h,w;cin >> h>>w;
    rep(i,0,h){
        string s(w,'a');
        if(i==0 || i==h-1){
            rep(j,0,w){
                s[j]='#';
            }
        }
        else {
            rep(j,0,w){
                if(j==0 || j==w-1){
                    s[j]='#';
                }
                else s[j]='.';
            }
        }
        cout << s<< "\n";
    }

    
}

提出情報

提出日時
問題 B - Draw Frame
ユーザ makijin
言語 C++23 (GCC 15.2.0)
得点 200
コード長 1488 Byte
結果 AC
実行時間 1 ms
メモリ 3644 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 200 / 200
結果
AC × 2
AC × 14
セット名 テストケース
Sample 00_sample_00.txt, 00_sample_01.txt
All 00_sample_00.txt, 00_sample_01.txt, 01_random_02.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt, 01_random_07.txt, 01_random_08.txt, 01_random_09.txt, 01_random_10.txt, 01_random_11.txt, 01_random_12.txt, 01_random_13.txt
ケース名 結果 実行時間 メモリ
00_sample_00.txt AC 1 ms 3644 KiB
00_sample_01.txt AC 1 ms 3532 KiB
01_random_02.txt AC 1 ms 3480 KiB
01_random_03.txt AC 1 ms 3532 KiB
01_random_04.txt AC 1 ms 3548 KiB
01_random_05.txt AC 1 ms 3596 KiB
01_random_06.txt AC 1 ms 3444 KiB
01_random_07.txt AC 1 ms 3616 KiB
01_random_08.txt AC 1 ms 3440 KiB
01_random_09.txt AC 1 ms 3440 KiB
01_random_10.txt AC 1 ms 3636 KiB
01_random_11.txt AC 1 ms 3464 KiB
01_random_12.txt AC 1 ms 3532 KiB
01_random_13.txt AC 1 ms 3480 KiB