結果

問題 No.287 場合の数
ユーザー こうきこうき
提出日時 2024-03-19 23:12:22
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 3 ms / 5,000 ms
コード長 4,373 bytes
コンパイル時間 3,626 ms
コンパイル使用メモリ 177,940 KB
実行使用メモリ 6,548 KB
最終ジャッジ日時 2024-03-19 23:12:27
合計ジャッジ時間 4,907 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,548 KB
testcase_01 AC 2 ms
6,548 KB
testcase_02 AC 2 ms
6,548 KB
testcase_03 AC 3 ms
6,548 KB
testcase_04 AC 2 ms
6,548 KB
testcase_05 AC 3 ms
6,548 KB
testcase_06 AC 2 ms
6,548 KB
testcase_07 AC 2 ms
6,548 KB
testcase_08 AC 3 ms
6,548 KB
testcase_09 AC 3 ms
6,548 KB
testcase_10 AC 3 ms
6,548 KB
testcase_11 AC 3 ms
6,548 KB
testcase_12 AC 3 ms
6,548 KB
testcase_13 AC 2 ms
6,548 KB
testcase_14 AC 2 ms
6,548 KB
testcase_15 AC 2 ms
6,548 KB
testcase_16 AC 2 ms
6,548 KB
testcase_17 AC 3 ms
6,548 KB
testcase_18 AC 2 ms
6,548 KB
testcase_19 AC 3 ms
6,548 KB
testcase_20 AC 2 ms
6,548 KB
testcase_21 AC 2 ms
6,548 KB
testcase_22 AC 2 ms
6,548 KB
testcase_23 AC 2 ms
6,548 KB
testcase_24 AC 2 ms
6,548 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <iostream>
#include <istream>
#include <iterator>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#include <tuple>
#include <iomanip>
#include <climits>
#include <fstream>
#include <random>
#include <stdio.h>
#include <math.h>
#include <cassert>
#include <unordered_set>
#include <unordered_map>
#include <atcoder/all>
using namespace std;


typedef long long ll;
typedef unsigned long long ull;
typedef vector<ll> vl;
typedef vector<vl> ml;
typedef vector<vector<int>> mati;
typedef vector<vector<ll>> matl;
// typedef pair<ll, ll> P;
// typedef pair<P, P> PP;
#define rep(i, n) for(int i = 0; i < (n); i++)
#define revrep(i, n) for(int i = (n)-1; i >= 0; i--)
#define itrrep(itr, s) for(auto itr=s.begin(); itr!=s.end(); itr++)
#define pb push_back
#define f first
#define s second
#define chmin(x, y) x = min(x, y);
#define chmax(x, y) x = max(x, y);
#define len(x) ((ll)(x).size())
#define all(x) (x).begin(), (x).end()
#define srt(x) sort(all(x))
#define rvs(x) reverse(all(x))
#define lb(x, v) lower_bound(all(x), v)
const ll INFL = 1LL<<60;
const ll INF = 1LL<<30;
// const ll MOD = 1000000007;
const ll MOD = 998244353;
double EPS = 1e-10;
const double PI=3.1415926535897932384626433832795028841971;
vector<ll>dy={0,1,0,-1,1,1,-1,-1,0};
vector<ll>dx={1,0,-1,0,1,-1,1,-1,0};

// for debug
template<typename __T__>
void put(__T__ x){cout<<x;}
template<typename __T__, typename __U__>
void put(pair<__T__ , __U__> x){put("{");put(x.f);put(", ");put(x.s);put("}");}
template<typename __T__>
void put(vector<__T__> x){put("[");rep(i,len(x)){put(x[i]);if(i!=len(x)-1)put(", ");}put("]");}
template<typename __T__>
void put(set<__T__> x){put("{");auto itr=x.begin();while(itr!=x.end()){put(*itr);itr++;if(itr!=x.end()){put(",  ");}}put("}");}
template<typename __T__, typename __U__>
void put(map<__T__, __U__> x){put("{");auto itr=x.begin();while(itr!=x.end()){put(itr->f);put("->");put(itr->s);itr++;if(itr!=x.end()){put(",  ");}}put("}");}
void print(){cout<<endl;}
template <class Head>
void print(Head&& head){put(head);cout<<endl;}
template <class Head, class... Tail>
void print(Head&& head, Tail&&... tail){put(head);put(" ");print(std::forward<Tail>(tail)...);}
#define debug(x) cout<<#x<<": ";print(x);
// io util
template<typename __T__>
void vecin(vector<__T__>& x){rep(i, len(x)){cin>>x[i];}}
template<typename __T__>
void matin(vector<vector<__T__>>& x){rep(i,len(x))rep(j,len(x[i])){cin>>x[i][j];}}
template<typename __T__>
void vecout(vector<__T__> x){rep(i,len(x)){cout<<x[i];if(i!=len(x)-1)cout<<" ";}cout<<endl;}
template<typename __T__>
void matout(vector<vector<__T__>> x){rep(i,len(x)){vecout(x[i]);}}
template<typename __T__>
void output(__T__ x){cout << x << endl;}
void input(){}
template <class Head, class... Tail>
void input(Head&& head, Tail&&... tail){cin>>head;input(forward<Tail>(tail)...);}
// util
template<typename __T__>
vector<__T__> to_unique(vector<__T__> x){sort(all(x));x.erase(unique(all(x)), x.end());return x;}
void pres(double A){cout<<setprecision(32)<<A<<endl;}
void BinaryPrint(ll x,ll y=8){rep(i,y)cout<<(x>>(y-1-i)&1);cout<<endl;}
ll cnt_bit(ll x){return __builtin_popcountll(x);}
ll pow_long(ll x,ll k){ll res=1;while(k>0){if(k%2)res*=x;x*=x;k/=2;}return res;}
ll pow_mod(ll x,ll k,ll _mod=MOD){ll res=1;while(k>0){if(k%2){res*=x;res%=_mod;}x*=x;x%=_mod;k/=2;}res%=_mod;return res;}
ll inverse(ll x,ll _mod=MOD){return pow_mod(x,MOD-2,_mod);};
ll gcd(ll a,ll b){if(b==0){return a;}return gcd(b,a%b);}
ll lcm(ll x,ll y){return x/gcd(x,y)*y;};
ll digit(ll A,ll d=10){ll res=0;while(A){res++;A/=d;}return res;}
ll str2ll(string s){ll res=0;rep(i,len(s)){res=res*10+s[i]-'0';}return res;}
ll str2llmod(string s,ll mod=MOD){ll res=0;rep(i,len(s)){res=(res*10+s[i]-'0')%mod;}return res;}
string ll2str(ll x){if(x==0)return "0";string res;ll d=digit(x);rep(i,digit(x)){res+='0'+x/pow_long(10,d-1-i)%10;}return res;}

// c++ -std=gnu++14 a.cpp
// g++ a.cpp -Wno-unqualified-std-cast-call -std=c++14 -I .
// #include <atcoder/all>

void solve(){
  ll N;
  cin >> N;
  vector<ll> A(N+1, 1);
  rep(_, 3){
    A = atcoder::convolution_ll(A, A);
  }
  cout << A[6*N] << endl;
}



int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  solve();
}












































//
0