結果
問題 |
No.1828 Except 3
|
ユーザー |
![]() |
提出日時 | 2022-02-01 20:21:54 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 514 bytes |
コンパイル時間 | 2,336 ms |
コンパイル使用メモリ | 193,968 KB |
最終ジャッジ日時 | 2025-01-27 18:12:40 |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 4 |
other | WA * 16 |
ソースコード
#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); cout << ans << endl; }