結果
問題 |
No.987 N×Mマス計算(基本)
|
ユーザー |
|
提出日時 | 2020-04-20 10:27:32 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 601 bytes |
コンパイル時間 | 651 ms |
コンパイル使用メモリ | 72,808 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-06 08:32:28 |
合計ジャッジ時間 | 1,167 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 18 |
ソースコード
#include <algorithm> #include <iostream> #include <string> #include <vector> #include <numeric> using namespace std; using ull = unsigned long long; #define Mod %1000000007 int main() { ull N, M; cin >> N >> M; char op; cin >> op; vector<ull> b(M); for (auto itr = b.begin(); itr != b.end(); ++itr) cin >> *itr; vector<ull> 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; }