結果

問題 No.3584 Camouflage Mole
コンテスト
ユーザー YumaMihara
提出日時 2026-07-11 01:29:52
言語 C++23(gcc16)
(gcc 16.1.0 + boost 1.90.0)
コンパイル:
g++-16 -O2 -lm -std=c++23 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
WA  
実行時間 -
コード長 537 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 4,900 ms
コンパイル使用メモリ 348,632 KB
実行使用メモリ 5,888 KB
最終ジャッジ日時 2026-07-11 01:30:00
合計ジャッジ時間 7,392 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 15 WA * 22
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

//#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using ll = long long;

ll MOD = 998244353;
ll modpow(ll x, ll a) {
  ll res = 1;
  while (a > 0) {
    if (a & 1) res = res * x % MOD;
    x = x * x % MOD;
    a = (a >> 1);
  }
  return res;
}

int main() {
  int n; cin >> n;
  //ans = nC4 * 26^(n - 4)
  ll ans = n * (n - 1) % MOD * (n - 2) % MOD * (n - 3) % MOD;
  ans = ans * modpow(1*2*3*4, MOD - 2) % MOD;
  cout << ans * modpow(26, n - 4) % MOD << '\n';
}
0