Submission #00001
ソースコード
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | #include<bits/stdc++.h> using namespace std; #define int long long signed main(){ int h,w; char c;cin>>w>>h>>c; vector<vector< char >>s(h,vector< char >(w, '.' )); s[0][0]=s[0][w-1]=s[h-1][0]=s[h-1][w-1]= '+' ; for ( int i=1;i<w-1;i++){ s[0][i]=s[h-1][i]= '-' ; } for ( int i=1;i<h-1;i++){ s[i][0]=s[i][w-1]= '|' ; } s[h/2][w/2]=c; for ( int i=0;i<h;i++){ for ( int j=0;j<w;j++){ cout<<s[i][j]; } cout<< "\n" ; } } |
ステータス
項目 | データ |
---|---|
問題 | 0001 - 旗を作ろう |
ユーザー名 | ei2326 |
投稿日時 | 2024-10-18 16:03:18 |
言語 | C++17 |
状態 | Accepted |
得点 | 3 |
ソースコード長 | 507 Byte |
最大実行時間 | 39 ms |
最大メモリ使用量 | 680 KB |
セット
セット | 得点 | Cases | |
---|---|---|---|
1 | ALL | 3 / 3 | * |
テストケース
ファイル名 | 状態 | 実行時間 | メモリ使用量 | # |
---|---|---|---|---|
in1.txt | AC | 39 ms | 604 KB |
1
|
in2.txt | AC | 25 ms | 576 KB |
1
|
in3.txt | AC | 34 ms | 420 KB |
1
|
in4.txt | AC | 24 ms | 644 KB |
1
|
in5.txt | AC | 29 ms | 620 KB |
1
|
in6.txt | AC | 17 ms | 584 KB |
1
|
in7.txt | AC | 32 ms | 680 KB |
1
|
in8.txt | AC | 18 ms | 520 KB |
1
|