結果

問題 No.987 N×Mマス計算(基本)
ユーザー umashi-pan-tnokk093n
提出日時 2020-04-03 22:37:20
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 701 bytes
コンパイル時間 1,873 ms
コンパイル使用メモリ 169,868 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-03 04:51:14
合計ジャッジ時間 3,284 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 13 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

#define rep(i, n) for(int i = 0; i < n; i++)
#define repr(i, n) for(int i = n; i >= 0; i--)

#define INF 2e9
#define ALL(v) v.begin(), v.end()

int main(){
    int n,m;
    char op;
    cin>>n>>m;
    vector<ll>b(m);
    vector<ll>a(n);
    int Num[n][m];
    cin>>op;
    rep(i,m){
        cin>>b[i];
    }
    rep(i,n){
        cin>>a[i];
    }
    for(int i=0;i<n;++i){
        for(int j=0;j<m;++j){
            if(op=='+'){
            Num[i][j]=a[i]+b[j];
            }
            else{
                Num[i][j]=a[i]*b[j];
            }
            cout<<Num[i][j]<<" ";
            
        }cout<<""<<endl;
    }return 0;
}
0