結果
| 問題 | No.412 花火大会 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-10-19 00:12:17 |
| 言語 | C++23(gcc16) (gcc 16.2.0 + boost 1.92.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 1 ms / 2,000 ms |
| + 956µs | |
| コード長 | 694 bytes |
| 記録 | |
| コンパイル時間 | 1,396 ms |
| コンパイル使用メモリ | 183,456 KB |
| 実行使用メモリ | 9,916 KB |
| 最終ジャッジ日時 | 2026-10-19 00:12:24 |
| 合計ジャッジ時間 | 3,500 ms |
|
ジャッジサーバーID (参考情報) |
judge6_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 17 |
ソースコード
#include <algorithm>
#include <iostream>
#include <utility>
#include <vector>
int main() {
using namespace std;
int b, c, d, n;
cin >> b >> c >> d >> n;
if (b > c) { swap(b, c); }
if (c > d) { swap(c, d); }
if (b > c) { swap(b, c); }
vector<int> a(n);
for (auto &e : a) { cin >> e; }
sort(a.begin(), a.end());
int ans = 0;
for (int i = 0; i < n; i++) {
if (a[i] < b) { continue; }
for (int j = i + 1; j < n; j++) {
if (a[j] < c) { continue; }
for (int k = j + 1; k < n; k++) {
if (a[k] < d) { continue; }
ans += 1 << i;
}
}
}
cout << ans << endl;
}