結果

問題 No.987 N×Mマス計算(基本)
ユーザー 👑 CleyL
提出日時 2020-02-14 21:22:01
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 464 bytes
コンパイル時間 477 ms
コンパイル使用メモリ 69,432 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-10-06 10:21:55
合計ジャッジ時間 1,151 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 13 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
using namespace std;
int main(){
    int h,w;cin>>h>>w;
    char k;cin>>k;
    vector<int> A(w);
    for(int i = 0; w > i; i++)cin>>A[i];
    vector<int> B(h);
    for(int i = 0; h > i; i++)cin>>B[i];
    for(int i = 0; h > i; i++){
        for(int j = 0; w > j; j++){
            if(k == '+')cout << A[j] + B[i];
            else cout << A[j]*B[i];
            if(j+1 != w)cout << " ";
        }
        cout << endl;
    }
}
0