結果
| 問題 |
No.987 N×Mマス計算(基本)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-11-23 04:30:30 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 583 bytes |
| コンパイル時間 | 1,625 ms |
| コンパイル使用メモリ | 193,956 KB |
| 最終ジャッジ日時 | 2025-01-26 00:33:26 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 13 WA * 5 |
ソースコード
#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 <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;
}