結果

問題 No.1532 Different Products
ユーザー りあんりあん
提出日時 2021-06-04 20:17:17
言語 C++17
(gcc 13.2.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 646 bytes
コンパイル時間 4,233 ms
コンパイル使用メモリ 208,580 KB
実行使用メモリ 11,840 KB
最終ジャッジ日時 2023-08-12 09:05:00
合計ジャッジ時間 25,965 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
4,888 KB
testcase_01 AC 72 ms
6,400 KB
testcase_02 AC 3 ms
4,932 KB
testcase_03 AC 3 ms
4,904 KB
testcase_04 AC 3 ms
4,548 KB
testcase_05 AC 3 ms
4,960 KB
testcase_06 AC 3 ms
5,132 KB
testcase_07 AC 3 ms
4,956 KB
testcase_08 AC 3 ms
5,088 KB
testcase_09 AC 15 ms
5,816 KB
testcase_10 AC 75 ms
7,568 KB
testcase_11 AC 55 ms
6,868 KB
testcase_12 WA -
testcase_13 AC 93 ms
8,092 KB
testcase_14 WA -
testcase_15 AC 4 ms
5,084 KB
testcase_16 AC 110 ms
6,368 KB
testcase_17 AC 57 ms
6,776 KB
testcase_18 AC 34 ms
6,768 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 156 ms
6,868 KB
testcase_22 AC 112 ms
7,624 KB
testcase_23 AC 46 ms
7,396 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 AC 19 ms
5,760 KB
testcase_27 WA -
testcase_28 AC 147 ms
7,372 KB
testcase_29 AC 156 ms
6,256 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 82 ms
5,636 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 3 ms
4,552 KB
testcase_62 AC 3 ms
4,632 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) {
        vector<pair<long long, int>> v;
        for (pair<long long, int> j : dp) {
            v.push_back(j);
        }
        for (auto& j : v) {
            if (j.first >= i) {
                dp[j.first / i] += j.second;
            }
        }
    }
    long long ans = 0;
    for (auto& i : dp) {
        ans += i.second;
    }
    cout << ans - 1 << '\n';
    return 0;
}
0