結果
| 問題 |
No.987 N×Mマス計算(基本)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-06-01 09:29:07 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 509 bytes |
| コンパイル時間 | 1,555 ms |
| コンパイル使用メモリ | 170,348 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-11-21 05:37:05 |
| 合計ジャッジ時間 | 2,712 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 2 |
| other | WA * 18 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main(void){
int n,m,i,j;
cin>>n>>m;
vector<int> a(n),b(m);
int ans[n][m];
char c;
cin>>c;
for(j=0;j<m;j++){
cin>>b[j];
}
for(i=0;i<n;i++){
cin>>a[i];
}
for(i=0;i<n;i++){
for(j=0;j<m;j++){
if(c=='+')ans[i][j]=a[i]+b[j];
if(c=='*')ans[i][j]=a[i]*b[j];
cout<<ans[i][j];
if(j<m-1)cout<<" ";
}
cout<<endl;
}
cout<<endl;
}