結果

問題 No.2155 みちらcolor
ユーザー だれだれ
提出日時 2022-12-09 21:39:11
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 11 ms / 2,000 ms
コード長 2,078 bytes
コンパイル時間 3,155 ms
コンパイル使用メモリ 182,280 KB
実行使用メモリ 11,072 KB
最終ジャッジ日時 2023-08-04 22:56:47
合計ジャッジ時間 5,621 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 11 ms
10,780 KB
testcase_01 AC 8 ms
8,344 KB
testcase_02 AC 6 ms
6,988 KB
testcase_03 AC 7 ms
7,724 KB
testcase_04 AC 7 ms
7,740 KB
testcase_05 AC 10 ms
9,620 KB
testcase_06 AC 5 ms
6,208 KB
testcase_07 AC 4 ms
5,152 KB
testcase_08 AC 7 ms
8,364 KB
testcase_09 AC 8 ms
8,900 KB
testcase_10 AC 6 ms
7,084 KB
testcase_11 AC 6 ms
6,712 KB
testcase_12 AC 8 ms
8,904 KB
testcase_13 AC 2 ms
4,376 KB
testcase_14 AC 9 ms
9,640 KB
testcase_15 AC 2 ms
4,376 KB
testcase_16 AC 6 ms
6,408 KB
testcase_17 AC 4 ms
4,388 KB
testcase_18 AC 8 ms
8,572 KB
testcase_19 AC 9 ms
9,160 KB
testcase_20 AC 10 ms
10,484 KB
testcase_21 AC 11 ms
11,072 KB
testcase_22 AC 9 ms
9,308 KB
testcase_23 AC 9 ms
9,616 KB
testcase_24 AC 11 ms
11,012 KB
testcase_25 AC 10 ms
10,696 KB
testcase_26 AC 10 ms
10,384 KB
testcase_27 AC 10 ms
10,692 KB
testcase_28 AC 10 ms
9,840 KB
testcase_29 AC 10 ms
9,596 KB
testcase_30 AC 9 ms
9,912 KB
testcase_31 AC 10 ms
10,436 KB
testcase_32 AC 10 ms
10,252 KB
testcase_33 AC 10 ms
10,432 KB
testcase_34 AC 10 ms
10,484 KB
testcase_35 AC 9 ms
9,684 KB
testcase_36 AC 10 ms
10,216 KB
testcase_37 AC 11 ms
10,776 KB
testcase_38 AC 9 ms
9,588 KB
testcase_39 AC 11 ms
10,932 KB
testcase_40 AC 11 ms
10,960 KB
testcase_41 AC 10 ms
10,896 KB
testcase_42 AC 10 ms
10,988 KB
testcase_43 AC 2 ms
4,376 KB
testcase_44 AC 2 ms
4,376 KB
testcase_45 AC 2 ms
4,376 KB
testcase_46 AC 2 ms
4,380 KB
testcase_47 AC 3 ms
4,672 KB
testcase_48 AC 3 ms
4,620 KB
testcase_49 AC 2 ms
4,376 KB
testcase_50 AC 3 ms
4,380 KB
testcase_51 AC 3 ms
4,388 KB
testcase_52 AC 3 ms
4,452 KB
testcase_53 AC 4 ms
4,708 KB
testcase_54 AC 3 ms
4,444 KB
testcase_55 AC 2 ms
4,376 KB
testcase_56 AC 3 ms
4,380 KB
testcase_57 AC 2 ms
4,380 KB
testcase_58 AC 2 ms
4,376 KB
testcase_59 AC 2 ms
4,380 KB
testcase_60 AC 2 ms
4,376 KB
testcase_61 AC 2 ms
4,376 KB
testcase_62 AC 3 ms
4,408 KB
testcase_63 AC 3 ms
4,376 KB
testcase_64 AC 2 ms
4,380 KB
testcase_65 AC 3 ms
4,376 KB
testcase_66 AC 2 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <unordered_set>
using namespace std;
#if __has_include(<atcoder/all>)
#include <atcoder/all>
using namespace atcoder;
#endif
#define GET_MACRO(_1, _2, _3, NAME, ...) NAME
#define _rep(i, n) _rep2(i, 0, n)
#define _rep2(i, a, b) for (int i = (int)(a); i < (int)(b); i++)
#define rep(...) GET_MACRO(__VA_ARGS__, _rep2, _rep)(__VA_ARGS__)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
using i64 = long long;
template <class T, class U>
bool chmin(T& a, const U& b) {
    return (b < a) ? (a = b, true) : false;
}
template <class T, class U>
bool chmax(T& a, const U& b) {
    return (b > a) ? (a = b, true) : false;
}
inline void YesNo(bool f, string yes = "Yes", string no = "No") {
    std::cout << (f ? yes : no) << "\n";
}

template <typename T>
istream& operator>>(istream& i, vector<T>& v) {
    rep(j, v.size()) i >> v[j];
    return i;
}
template <typename T>
string join(vector<T>& v) {
    stringstream s;
    rep(i, v.size()) s << ' ' << v[i];
    return s.str().substr(1);
}
template <typename T>
ostream& operator<<(ostream& o, vector<T>& v) {
    if (v.size()) o << join(v);
    return o;
}
template <typename T>
string join(vector<vector<T>>& vv) {
    string s = "\n";
    rep(i, vv.size()) s += join(vv[i]) + "\n";
    return s;
}
template <typename T>
ostream& operator<<(ostream& o, vector<vector<T>>& vv) {
    if (vv.size()) o << join(vv);
    return o;
}

int main() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    int n, m, l;
    cin >> n >> m >> l;
    vector dp(n + 1, vector<int>(20010));
    dp[0][l] = 1;
    rep(i, n) {
        int a;
        cin >> a;
        rep(j, 20001) {
            dp[i + 1][j] |= dp[i][j];
            dp[i + 1][(j + a) / 2] |= dp[i][j];
        }
    }
    YesNo(dp[n][m]);
}
0