結果
| 問題 | No.987 N×Mマス計算(基本) |
| コンテスト | |
| ユーザー |
ldsyb
|
| 提出日時 | 2026-09-12 00:50:08 |
| 言語 | C++23 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 1 ms / 2,000 ms |
| + 999µs | |
| コード長 | 669 bytes |
| 記録 | |
| コンパイル時間 | 4,947 ms |
| コンパイル使用メモリ | 375,652 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-09-12 00:50:15 |
| 合計ジャッジ時間 | 6,031 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 18 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using namespace chrono;
#if __has_include(<atcoder/all>)
#include <atcoder/all>
using namespace atcoder;
#endif
int main() {
int64_t n, m;
char c;
cin >> n >> m >> c;
vector<int64_t> bs(m), as(n);
for (auto &&b : bs) {
cin >> b;
}
for (auto &&a : as) {
cin >> a;
}
for (int64_t i = 0; i < n; i++) {
for (int64_t j = 0; j < m; j++) {
if (c == '+') {
cout << (as[i] + bs[j]) << ' ';
} else if (c == '*') {
cout << (as[i] * bs[j]) << ' ';
}
}
cout << endl;
}
return 0;
}
ldsyb