結果

問題 No.987 N×Mマス計算(基本)
ユーザー Moon0603
提出日時 2020-02-14 21:23:36
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 489 bytes
コンパイル時間 1,630 ms
コンパイル使用メモリ 168,596 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-10-06 10:25:09
合計ジャッジ時間 2,392 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 13 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int n, m;
  cin >> n >> m;
  char c;
  cin >> c;
  vector<int> a(n), b(m);
  for (int i = 0; i < m; ++i) {
    cin >> b[i];
  }
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < m; ++j) {
      if (c == '+') cout << a[i] + b[j] << " ";
      else cout << a[i] * b[j] << " ";
    }
    cout << '\n';
  }
  return 0;
}
0