結果
| 問題 |
No.1828 Except 3
|
| ユーザー |
gazelle
|
| 提出日時 | 2022-02-01 20:22:38 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 17 ms / 2,000 ms |
| コード長 | 514 bytes |
| コンパイル時間 | 2,495 ms |
| コンパイル使用メモリ | 195,920 KB |
| 最終ジャッジ日時 | 2025-01-27 18:12:47 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 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(b.begin(), b.end(), div3);
ans *= count_if(c.begin(), c.end(), div3);
cout << ans << endl;
}
gazelle