結果

問題 No.1532 Different Products
ユーザー りあんりあん
提出日時 2021-06-04 20:19:35
言語 C++17
(gcc 13.2.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 594 bytes
コンパイル時間 2,271 ms
コンパイル使用メモリ 209,660 KB
実行使用メモリ 12,236 KB
最終ジャッジ日時 2023-08-12 09:11:01
合計ジャッジ時間 45,692 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 6 ms
6,380 KB
testcase_01 AC 173 ms
8,124 KB
testcase_02 AC 10 ms
6,420 KB
testcase_03 AC 6 ms
6,508 KB
testcase_04 AC 8 ms
6,424 KB
testcase_05 AC 6 ms
6,424 KB
testcase_06 AC 8 ms
6,384 KB
testcase_07 AC 10 ms
6,508 KB
testcase_08 AC 11 ms
6,680 KB
testcase_09 AC 40 ms
7,656 KB
testcase_10 AC 175 ms
8,552 KB
testcase_11 AC 131 ms
8,256 KB
testcase_12 WA -
testcase_13 AC 205 ms
9,312 KB
testcase_14 WA -
testcase_15 AC 12 ms
6,860 KB
testcase_16 AC 269 ms
7,992 KB
testcase_17 AC 135 ms
8,704 KB
testcase_18 AC 80 ms
8,264 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 374 ms
8,380 KB
testcase_22 AC 241 ms
9,320 KB
testcase_23 AC 101 ms
8,588 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 AC 52 ms
7,340 KB
testcase_27 WA -
testcase_28 AC 334 ms
8,920 KB
testcase_29 AC 374 ms
8,112 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 222 ms
7,204 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,648 KB
testcase_62 AC 5 ms
6,420 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