結果

問題 No.2684 折々の色
ユーザー SnowBeenDidingSnowBeenDiding
提出日時 2024-03-20 22:39:52
言語 C++23
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 1,196 bytes
コンパイル時間 6,465 ms
コンパイル使用メモリ 321,728 KB
実行使用メモリ 83,316 KB
最終ジャッジ日時 2024-03-20 22:41:01
合計ジャッジ時間 67,880 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,548 KB
testcase_01 AC 2 ms
6,548 KB
testcase_02 AC 3 ms
6,548 KB
testcase_03 AC 2 ms
6,548 KB
testcase_04 AC 3 ms
6,548 KB
testcase_05 AC 2 ms
6,548 KB
testcase_06 AC 2 ms
6,548 KB
testcase_07 AC 2 ms
6,548 KB
testcase_08 AC 3 ms
6,548 KB
testcase_09 AC 2 ms
6,548 KB
testcase_10 AC 2 ms
6,548 KB
testcase_11 AC 1,189 ms
42,920 KB
testcase_12 AC 334 ms
29,184 KB
testcase_13 AC 1,720 ms
50,216 KB
testcase_14 AC 720 ms
26,880 KB
testcase_15 AC 794 ms
31,488 KB
testcase_16 AC 136 ms
10,112 KB
testcase_17 AC 490 ms
27,008 KB
testcase_18 AC 1,623 ms
47,344 KB
testcase_19 AC 1,555 ms
51,604 KB
testcase_20 AC 940 ms
35,328 KB
testcase_21 AC 476 ms
14,336 KB
testcase_22 AC 1,895 ms
49,188 KB
testcase_23 AC 1,098 ms
35,968 KB
testcase_24 AC 644 ms
19,840 KB
testcase_25 AC 831 ms
27,008 KB
testcase_26 AC 1,501 ms
46,444 KB
testcase_27 AC 997 ms
30,592 KB
testcase_28 AC 1,095 ms
35,712 KB
testcase_29 AC 1,373 ms
77,696 KB
testcase_30 AC 1,124 ms
74,884 KB
testcase_31 AC 1,495 ms
76,732 KB
testcase_32 AC 1,807 ms
79,548 KB
testcase_33 AC 1,340 ms
78,712 KB
testcase_34 AC 1,911 ms
77,132 KB
testcase_35 AC 1,940 ms
77,864 KB
testcase_36 AC 1,358 ms
75,652 KB
testcase_37 TLE -
testcase_38 TLE -
testcase_39 TLE -
testcase_40 TLE -
testcase_41 TLE -
testcase_42 TLE -
testcase_43 TLE -
testcase_44 TLE -
testcase_45 TLE -
testcase_46 TLE -
testcase_47 AC 3 ms
6,548 KB
testcase_48 AC 2 ms
6,548 KB
testcase_49 AC 2 ms
6,548 KB
testcase_50 AC 3 ms
6,548 KB
testcase_51 AC 2 ms
6,548 KB
testcase_52 AC 3 ms
6,548 KB
testcase_53 AC 2 ms
6,548 KB
testcase_54 AC 2 ms
6,548 KB
testcase_55 AC 2 ms
6,548 KB
testcase_56 AC 2 ms
6,548 KB
testcase_57 AC 2 ms
6,548 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

#include <atcoder/all>
#define rep(i, a, b) for (ll i = (ll)(a); i < (ll)(b); i++)
using namespace std;
using namespace atcoder;

typedef long long ll;
using mint = modint998244353;

int main() {
    int h, w;
    cin >> h >> w;
    vector<ll> x(w), t(h);
    rep(i, 0, w) cin >> x[i];
    vector<vector<ll>> c(h, vector<ll>(w));
    map<vector<ll>, int> ma;
    rep(i, 0, h) {
        rep(j, 0, w) cin >> c[i][j];
        cin >> t[i];
        c[i].push_back(t[i]);
        ma[c[i]]++;
    }

    vector<ll> none = {-1};
    auto f = [&](int ind, ll tt) {
        vector<ll> ret(w);
        rep(j, 0, w) {
            ll q = 10000LL * x[j];
            q -= (100LL - tt) * t[ind] * c[ind][j];
            ll p = tt * 100;
            if (abs(q) % abs(p) != 0) return none;
            ret[j] = q / p;
        }
        ret.push_back(tt);
        return ret;
    };

    rep(i, 0, h) {
        ma[c[i]]--;
        rep(j, 1, 101) {
            auto v = f(i, j);
            if (v == none) continue;
            if (ma[v] > 0) {
                cout << "Yes" << endl;
                return 0;
            }
        }
        ma[c[i]]++;
    }

    cout << "No" << endl;
}
0