結果

問題 No.1598 4×4 Grid
ユーザー saksak
提出日時 2021-07-09 22:51:28
言語 C++17
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 4,000 ms
コード長 2,721 bytes
コンパイル時間 1,932 ms
コンパイル使用メモリ 200,760 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-14 10:28:04
合計ジャッジ時間 2,731 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 2 ms
4,380 KB
testcase_03 AC 1 ms
4,376 KB
testcase_04 AC 2 ms
4,380 KB
testcase_05 AC 1 ms
4,380 KB
testcase_06 AC 1 ms
4,376 KB
testcase_07 AC 1 ms
4,376 KB
testcase_08 AC 1 ms
4,380 KB
testcase_09 AC 1 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
typedef pair<ll, ll> p_ll;

template<class T>
void debug(T itr1, T itr2) { auto now = itr1; while(now<itr2) { cout << *now << " "; now++; } cout << endl; }
#define repr(i,from,to) for (ll i=(ll)from; i<(ll)to; i++)
#define all(vec) vec.begin(), vec.end()
#define rep(i,N) repr(i,0,N)
#define per(i,N) for (ll i=(ll)N-1; i>=0; i--)
#define popcount __builtin_popcount

const ll LLINF = pow(2,61)-1;
const ll INF = pow(2,30)-1;

ll gcd(ll a, ll b) { if (a<b) swap(a,b); return b==0 ? a : gcd(b, a%b); }
ll lcm(ll a, ll b) { return a/gcd(a,b)*b; }

int main() {
  ll K; cin >> K;
  vector<ll> zuru = {
    0,0,0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,0,0,
    576,6336,32688,109728,292360,690720,1482192,2901904,5290232,9051184,
    14818296,23208336,35444224,52313280,76165896,107817376,151136456,206538688,280850520,373958336,
    496563792,646511552,841022448,1073940272,1373159520,1724472448,2173965112,2693936208,3356996536,4112879776,
    5069503864,6145698704,7500374992,9002291472,10886553960,12950023664,15534989704,18330191088,21826592520,25556185792,
    30214911160,35115721776,41213475560,47528745680,55374598960,63355584272,73235329704,83088661872,95252098840,107100384672,
    121728039728,135636185488,152817991288,168730272976,188461179128,206185000928,228279868744,247485171200,271619130776,291810650816,
    317478414304,337980395648,364517045992,384542256192,411098567064,429692899120,455298745848,471402797888,495019582768,507574350192,
    528077104696,536056894256,552532363064,555126691616,566752110520,563549800176,569825698888,560753046592,561635860016,547051629840,
    542801041800,523561475168,514791687840,491843064800,479502626904,453886694304,438919104360,411796882592,395006790760,367318421328,
    349592862160,322244522592,304279133304,278166338192,260606817328,236415450464,219798733352,198011699984,182673877024,163585063776,
    149759315744,133360838032,121291416320,107364586352,97039206120,85460340016,76744851464,67244513664,60024991512,52289411200,
    46383784240,40172660592,35384317192,30414790512,26601233192,22681003744,19659744320,16621353472,14263408928,11954242720,
    10179313056,8450681536,7142896704,5909870720,4978519840,4116551680,3467513504,2870172672,2417125568,2001875712,
    1681805056,1384848768,1159246976,944311168,780931392,633980416,518132736,414036352,332820480,262237056,
    208061056,159154176,122112768,90448896,67079040,47692032,33697536,22858752,15363072,9566208,
    5750784,3115008,1585152,663552,258048,73728,18432
  };
  ll result = zuru[K];
  cout << result << endl;
  return 0;
}
0