結果
問題 | No.1399 すごろくで世界旅行 (構築) |
ユーザー |
![]() |
提出日時 | 2021-02-19 22:04:50 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 7 ms / 3,153 ms |
コード長 | 416 bytes |
コンパイル時間 | 3,599 ms |
コンパイル使用メモリ | 194,624 KB |
最終ジャッジ日時 | 2025-01-19 00:05:53 |
ジャッジサーバーID (参考情報) |
judge5 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 22 |
ソースコード
#include <stdio.h> #include <bits/stdc++.h> using namespace std; #define rep(i,n) for (int i = 0; i < (n); ++i) #define Inf 1000000000 int main(){ int V,D; cin>>V>>D; vector<string> ans(V,string(V,'0')); if(D>=2){ rep(i,V){ ans[i][0] = '1'; ans[0][i] = '1'; } } else if(D==1){ rep(i,V){ rep(j,V){ ans[i][j] = '1'; } } } rep(i,V){ cout<<ans[i]<<endl; } return 0; }