結果

問題 No.2748 Strange Clock
ユーザー Nzt3Nzt3
提出日時 2024-04-13 02:32:00
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 3 ms / 2,000 ms
コード長 1,323 bytes
コンパイル時間 2,335 ms
コンパイル使用メモリ 202,484 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-04-13 02:39:40
合計ジャッジ時間 3,724 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,816 KB
testcase_01 AC 2 ms
6,940 KB
testcase_02 AC 2 ms
6,940 KB
testcase_03 AC 2 ms
6,940 KB
testcase_04 AC 2 ms
6,940 KB
testcase_05 AC 2 ms
6,940 KB
testcase_06 AC 3 ms
6,940 KB
testcase_07 AC 2 ms
6,940 KB
testcase_08 AC 2 ms
6,940 KB
testcase_09 AC 2 ms
6,944 KB
testcase_10 AC 2 ms
6,944 KB
testcase_11 AC 2 ms
6,940 KB
testcase_12 AC 2 ms
6,940 KB
testcase_13 AC 2 ms
6,940 KB
testcase_14 AC 2 ms
6,940 KB
testcase_15 AC 2 ms
6,940 KB
testcase_16 AC 2 ms
6,940 KB
testcase_17 AC 2 ms
6,940 KB
testcase_18 AC 2 ms
6,940 KB
testcase_19 AC 2 ms
6,940 KB
testcase_20 AC 2 ms
6,940 KB
testcase_21 AC 2 ms
6,944 KB
testcase_22 AC 2 ms
6,944 KB
testcase_23 AC 2 ms
6,944 KB
testcase_24 AC 2 ms
6,940 KB
testcase_25 AC 2 ms
6,944 KB
testcase_26 AC 2 ms
6,940 KB
testcase_27 AC 1 ms
6,948 KB
testcase_28 AC 2 ms
6,944 KB
testcase_29 AC 2 ms
6,940 KB
testcase_30 AC 2 ms
6,944 KB
testcase_31 AC 2 ms
6,944 KB
testcase_32 AC 2 ms
6,940 KB
testcase_33 AC 2 ms
6,940 KB
testcase_34 AC 2 ms
6,944 KB
testcase_35 AC 2 ms
6,940 KB
testcase_36 AC 2 ms
6,940 KB
testcase_37 AC 2 ms
6,940 KB
testcase_38 AC 2 ms
6,944 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

int main(){
  vector<vector<ll>> Ts={
    {1,10},
    {1,142},
    {1,286,1438,1726},
    {1,5470,15262,20734},
    {1,15262,26206,41470,192094,207358,233566,248830},
    {1,264094,705022,2016862,2280958,2721886,2985982},
    {1,3250078,5971966,9222046,20637790,26609758,29859838,35831806},
    {1,80885662,182409118,194353054,235628638,247572574,349096030,429981694},
    {1,859963390,4299816958,5159780350},
    {1,16339304446,45578059774,61917364222},
    {1,123834728446,619173642238,743008370686},
    {1,2105190383614,6810910064638,8916100448254},
    {1,17832200896510,89161004482558,106993205379070},
    {1,1283918464548862},
    {1,2567836929097726,12839184645488638,15407021574586366}
  },
  Cnt={
    {2,1},
    {6,3},
    {18,3,3,3},
    {54,6,6,15},
    {162,18,6,15,6,15,6,15},
    {486,18,54,12,42,6,111},
    {1458,18,243,18,18,18,207,207},
    {4374,108,18,18,18,18,108,1899},
    {13122,2187,2187,2187},
    {39366,4374,4374,10935},
    {118098,19683,19683,19683},
    {354294,39366,39366,98415},
    {1062882,177147,177147,177147},
    {3188646,1594323},
    {9565938,1594323,1594323,1594323}
  };
  ll N,M;
  cin>>N>>M;
  ll ans=0;
  for(int i=0;i<(int)Ts[N-1].size();i++){
    if(Ts[N-1][i]>M)ans+=Cnt[N-1][i];
  }
  cout<<ans<<'\n';
}
0