結果

問題 No.987 N×Mマス計算(基本)
ユーザー eSeF
提出日時 2020-02-17 16:30:18
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 4 ms / 2,000 ms
コード長 561 bytes
コンパイル時間 2,401 ms
コンパイル使用メモリ 194,156 KB
最終ジャッジ日時 2025-01-09 00:58:23
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 18
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;i++)
typedef long long ll;
const int MOD = ((int)1e9)+7;
const int INF = (int)(1e9)+(int)(1e7);
const ll INFL = (ll)(1e18)+INF;
const double EPS = 1e-8;
using namespace std;
int main()
{
    int N,M;
    cin >> N >> M;
    char op;
    cin >> op;
    vector<ll>A(N),B(M);
    rep(i,M){cin >> B[i];}
    rep(i,N){cin >> A[i];}
    rep(i,N){
        rep(j,M){
            if(op=='+')cout << A[i]+B[j] << " ";
            else cout << A[i]*B[j] << " ";
        }
        cout << endl;
    }
    return 0;
}
0