結果

問題 No.1532 Different Products
ユーザー りあんりあん
提出日時 2021-06-04 20:19:35
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 594 bytes
コンパイル時間 2,257 ms
コンパイル使用メモリ 210,544 KB
実行使用メモリ 12,432 KB
最終ジャッジ日時 2024-04-29 23:36:31
合計ジャッジ時間 48,303 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 6 ms
6,668 KB
testcase_01 AC 170 ms
8,204 KB
testcase_02 AC 9 ms
6,672 KB
testcase_03 AC 7 ms
6,668 KB
testcase_04 AC 8 ms
6,540 KB
testcase_05 AC 6 ms
6,536 KB
testcase_06 AC 8 ms
6,664 KB
testcase_07 AC 10 ms
6,672 KB
testcase_08 AC 11 ms
6,664 KB
testcase_09 AC 40 ms
7,560 KB
testcase_10 AC 170 ms
8,844 KB
testcase_11 AC 127 ms
8,456 KB
testcase_12 WA -
testcase_13 AC 204 ms
9,612 KB
testcase_14 WA -
testcase_15 AC 12 ms
6,920 KB
testcase_16 AC 259 ms
8,200 KB
testcase_17 AC 131 ms
8,464 KB
testcase_18 AC 77 ms
8,448 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 385 ms
8,584 KB
testcase_22 AC 252 ms
9,484 KB
testcase_23 AC 105 ms
8,844 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 AC 56 ms
7,432 KB
testcase_27 WA -
testcase_28 AC 334 ms
8,720 KB
testcase_29 AC 368 ms
8,204 KB
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
testcase_36 WA -
testcase_37 AC 224 ms
7,560 KB
testcase_38 WA -
testcase_39 WA -
testcase_40 WA -
testcase_41 WA -
testcase_42 WA -
testcase_43 WA -
testcase_44 WA -
testcase_45 WA -
testcase_46 WA -
testcase_47 WA -
testcase_48 WA -
testcase_49 WA -
testcase_50 WA -
testcase_51 WA -
testcase_52 WA -
testcase_53 WA -
testcase_54 WA -
testcase_55 WA -
testcase_56 WA -
testcase_57 WA -
testcase_58 WA -
testcase_59 WA -
testcase_60 WA -
testcase_61 AC 6 ms
6,540 KB
testcase_62 AC 6 ms
6,672 KB
testcase_63 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;



int main() {
    cin.tie(0);
    ios::sync_with_stdio(0);
    int n;
    long long k;
    cin >> n >> k;
    unordered_map<long long, int> dp;
    dp.reserve(210000);
    dp[k] = 1;
    for (int i = 1; i <= n; ++i) {
        unordered_map<long long, int> nex = dp;
        for (auto& j : dp) {
            if (j.first >= i) {
                nex[j.first / i] += j.second;
            }
        }
        dp = nex;
    }
    long long ans = 0;
    for (auto& i : dp) {
        ans += i.second;
    }
    cout << ans - 1 << '\n';


    return 0;
}
0