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<