From c0aaa4c93d0f43a3b42729a6fa196c1c7b5c5b4a Mon Sep 17 00:00:00 2001 From: haoxuan Date: Sat, 28 Feb 2026 05:04:58 -0500 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=96=87=E4=BB=B6=E8=87=B3?= =?UTF-8?q?=E3=80=8C0228=E3=80=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit n*n矩阵 --- 0228/163.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 0228/163.cpp diff --git a/0228/163.cpp b/0228/163.cpp new file mode 100644 index 0000000..a094386 --- /dev/null +++ b/0228/163.cpp @@ -0,0 +1,23 @@ +#include +#include +using namespace std; +int main(){ + int n; + cin>>n; + for(int i=1;i<=n;i++){ + for(int j=1;j<=n;j++){ + if(j==1 or j==n){ + cout<<"|"; + } + else + if(i==(n+1)/2){ + cout<<"-"; + } + else + cout<<"a"; + } + cout<