結果

問題 No.1828 Except 3
ユーザー gazelle
提出日時 2022-02-01 20:21:08
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 484 bytes
コンパイル時間 1,872 ms
コンパイル使用メモリ 193,472 KB
最終ジャッジ日時 2025-01-27 18:12:32
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 4
other WA * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;

int main() {
    int n;
    cin >> n;
    vector<int> a(n), b(n), c(n);
    for(int i = 0; i < n; i++) cin >> a[i];
    for(int i = 0; i < n; i++) cin >> b[i];
    for(int i = 0; i < n; i++) cin >> c[i];
    
    long long ans = 1;
    auto div3 = [] (int x) -> bool { return x % 3 == 0; };
    
    ans *= count_if(a.begin(), a.end(), div3);
    ans *= count_if(a.begin(), b.end(), div3);
    ans *= count_if(a.begin(), c.end(), div3);
}
0