From 20dae47adf1c1b2a2fe5a467302a8467a01eb53a Mon Sep 17 00:00:00 2001 From: Zengtudor Date: Thu, 21 Nov 2024 14:00:30 +0800 Subject: [PATCH] update --- src/B2104/B2104.cpp | 30 +++++++++++++++++++++++++ src/B2105/B2105.cpp | 55 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 85 insertions(+) create mode 100644 src/B2104/B2104.cpp create mode 100644 src/B2105/B2105.cpp diff --git a/src/B2104/B2104.cpp b/src/B2104/B2104.cpp new file mode 100644 index 0000000..4adaa85 --- /dev/null +++ b/src/B2104/B2104.cpp @@ -0,0 +1,30 @@ +#include + +using namespace std; +using ll = int64_t; + +const ll maxn{105}; +ll n,m; +ll a[maxn][maxn]; + +int main(){ + iostream::sync_with_stdio(false),cin.tie(0),cout.tie(0); + cin>>n>>m; + const auto ra = [&](){ + ll t; + for(ll i{1};i<=n;i++){ + for(ll j{1};j<=m;j++){ + cin>>t; + a[i][j]+=t; + } + } + }; + ra(); + ra(); + for(ll i{1};i<=n;i++){ + for(ll j{1};j<=m;j++){ + cout< +using ll = int64_t; +using namespace std; + +const ll maxn{ll(100+5)}; +ll n,m,k,a[maxn][maxn],b[maxn][maxn],c[maxn][maxn]; + +struct CinN{ + char c; + ll n,w; + CinN &operator>>(ll &num)noexcept{ + c=n=0; + w=1; + while(!isdigit(c)){ + if(c=='-')w=-1; + c=getchar(); + } + while(isdigit(c)){ + n=n*10+c-'0'; + c=getchar(); + } + num=n*w; + return *this; + } +}cinn; + +#define cin cinn + +int main(){ + iostream::sync_with_stdio(0)/*,cin.tie(0),cout.tie(0)*/; + cin>>n>>m>>k; + const auto rdmtx = [](ll (&mtx)[maxn][maxn],ll const &n,ll const &m){ + for(ll i{1};i<=n;i++){ + for(ll j{1};j<=m;j++){ + cin>>mtx[i][j]; + } + } + }; + const auto pmtx = [](ll (&mtx)[maxn][maxn],ll const &n,ll const &m){ + for(ll i{1};i<=n;i++){ + for(ll j{1};j<=m;j++){ + cout<