結果
問題 |
No.987 N×Mマス計算(基本)
|
ユーザー |
|
提出日時 | 2020-04-08 10:35:25 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 4 ms / 2,000 ms |
コード長 | 558 bytes |
コンパイル時間 | 758 ms |
コンパイル使用メモリ | 72,552 KB |
最終ジャッジ日時 | 2025-01-09 15:07:27 |
ジャッジサーバーID (参考情報) |
judge3 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 18 |
ソースコード
#include <iostream> #include <vector> using lint = long long; void solve() { int n, m; std::cin >> n >> m; char c; std::cin >> c; std::vector<lint> ys(m); for (auto& y : ys) std::cin >> y; std::vector<lint> xs(n); for (auto& x : xs) std::cin >> x; for (auto x : xs) { for (auto y : ys) { std::cout << (c == '+' ? x + y : x * y) << " "; } std::cout << std::endl; } } int main() { std::cin.tie(nullptr); std::ios::sync_with_stdio(false); solve(); return 0; }