結果
問題 |
No.987 N×Mマス計算(基本)
|
ユーザー |
|
提出日時 | 2021-11-23 04:30:49 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 589 bytes |
コンパイル時間 | 1,553 ms |
コンパイル使用メモリ | 194,288 KB |
最終ジャッジ日時 | 2025-01-26 00:33:35 |
ジャッジサーバーID (参考情報) |
judge4 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 18 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(void) { cin.tie(0); ios::sync_with_stdio(false); int n,m,t; char op; vector <long long int> a,b; cin >> n >> m; cin >> op; for(int i=0;i<m;i++) { cin >> t; b.push_back(t); } for(int i=0;i<n;i++) { cin >> t; a.push_back(t); } 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 << '\n'; } return 0; }