結果
問題 |
No.987 N×Mマス計算(基本)
|
ユーザー |
|
提出日時 | 2020-04-20 10:25:37 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 600 bytes |
コンパイル時間 | 739 ms |
コンパイル使用メモリ | 72,228 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-06 08:32:14 |
合計ジャッジ時間 | 1,758 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 1 |
other | AC * 9 WA * 9 |
ソースコード
#include <algorithm> #include <iostream> #include <string> #include <vector> #include <numeric> using namespace std; using ull = unsigned long long; #define Mod %1000000007 int main() { int N, M; cin >> N >> M; char op; cin >> op; vector<int> b(M); for (auto itr = b.begin(); itr != b.end(); ++itr) cin >> *itr; vector<int> a(N); for (auto itr = a.begin(); itr != a.end(); ++itr) cin >> *itr; for (int i = 0; i < N; ++i) { for (int j = 0; j < M; ++j) { if (op = '+') cout << a[i] + b[j] << " "; else cout << a[i] * b[j] << " "; } cout << endl; } return 0; }