Submission #19555823


Source Code Expand

Copy
#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
#define REP(i,a,n) for(int i=(a); i<(int)(n); i++)
#define rep(i,n) REP(i,0,n)
#define FOR(it,c) for(__typeof((c).begin()) it=(c).begin(); it!=(c).end(); ++it)
#define ALLOF(c) (c).begin(), (c).end()
typedef long long ll;
typedef unsigned long long ull;
//using mint = modint1000000007;
using mint = modint998244353;

ostream &operator<<(ostream& os, const mint& x) {
  os << x.val();
  return os;
}
bool operator==(const mint& a, const mint& b){
  return a.val() == b.val();
}
class modutils {
  vector<mint> fact, invfact;
public:
  modutils(int n = 2000005):fact(n+1),invfact(n+1) {
    fact[0] = 1;
    for(int i=1; i<=n; i++) fact[i] = fact[i-1] * i;
    invfact[n] = fact[n].inv();
    for(int i=n; i>=1; i--) invfact[i-1] = invfact[i] * i;
  }
  mint pow(mint x, ll n) {
    return x.pow(n);
  }
  mint comb(ll n, ll k) {
    if(n<0 || k<0 || n<k) return 0;
    return fact[n] * invfact[k] * invfact[n-k];
  }
  mint perm(ll n, ll k) {
    if(n<0 || k<0 || n<k) return 0;
    return fact[n] * invfact[n-k];
  }
  mint fac(ll n) {
    return fact[n];
  }
  mint invfac(ll n) {
    return invfact[n];
  }
};
modutils mutil;



int main(){
  int d;
  cin >> d;

  mint ret = mutil.comb(2*d,d) / 2;

  cout << ret << endl;
  
  return 0;
}

Submission Info

Submission Time
Task A - Dodecagon
User phyllo
Language C++ (GCC 9.2.1)
Score 500
Code Size 1400 Byte
Status AC
Exec Time 38 ms
Memory 18648 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 500 / 500
Status
AC × 1
AC × 12
Set Name Test Cases
Sample example0.txt
All 000.txt, 001.txt, 002.txt, 003.txt, 004.txt, 005.txt, 006.txt, 007.txt, 008.txt, 009.txt, 010.txt, example0.txt
Case Name Status Exec Time Memory
000.txt AC 31 ms 18488 KB
001.txt AC 36 ms 18608 KB
002.txt AC 34 ms 18520 KB
003.txt AC 32 ms 18588 KB
004.txt AC 34 ms 18496 KB
005.txt AC 35 ms 18612 KB
006.txt AC 36 ms 18608 KB
007.txt AC 35 ms 18476 KB
008.txt AC 33 ms 18648 KB
009.txt AC 30 ms 18504 KB
010.txt AC 33 ms 18616 KB
example0.txt AC 38 ms 18608 KB