結果

問題 No.987 N×Mマス計算(基本)
ユーザー sonotarousonotarou
提出日時 2021-02-26 21:56:58
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 584 bytes
コンパイル時間 3,336 ms
コンパイル使用メモリ 224,776 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-04-10 12:37:23
合計ジャッジ時間 4,254 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,816 KB
testcase_01 AC 2 ms
6,940 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 1 ms
6,944 KB
testcase_06 AC 2 ms
6,944 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 2 ms
6,940 KB
testcase_10 WA -
testcase_11 AC 2 ms
6,940 KB
testcase_12 WA -
testcase_13 AC 2 ms
6,944 KB
testcase_14 AC 2 ms
6,940 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 2 ms
6,944 KB
testcase_19 AC 2 ms
6,940 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
template<class T> inline bool chmax(T&a,T b){if(a<b){a=b;return 1;}return 0;}
template<class T> inline bool chmin(T&a,T b){if(a>b){a=b;return 1;}return 0;}
using ll = long long;

int n,m;
char op;
ll a[110],b[110];

int main () {
    cin.tie(0); ios::sync_with_stdio(false); 

    cin >> n >> m >> op;
    rep(i,m) cin >> b[i];
    rep(i,m) cin >> a[i];

    rep(i,n)rep(j,m) cout << (op=='+' ? a[i]+b[j] : a[i]*b[j]) << (j==m-1 ? '\n' : ' ');
}
0