結果
| 問題 |
No.2391 SAN 値チェック
|
| コンテスト | |
| ユーザー |
遭難者
|
| 提出日時 | 2023-07-21 23:13:01 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
CE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 895 bytes |
| コンパイル時間 | 4,642 ms |
| コンパイル使用メモリ | 323,232 KB |
| 最終ジャッジ日時 | 2025-01-18 12:17:14 |
| 合計ジャッジ時間 | 6,135 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
In file included from /usr/include/c++/13/string:43,
from /usr/include/c++/13/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:52,
from main.cpp:5:
/usr/include/c++/13/bits/allocator.h: In destructor ‘constexpr std::_Bvector_base<std::allocator<bool> >::_Bvector_impl::~_Bvector_impl()’:
/usr/include/c++/13/bits/allocator.h:184:7: error: inlining failed in call to ‘always_inline’ ‘constexpr std::allocator< <template-parameter-1-1> >::~allocator() noexcept [with _Tp = long unsigned int]’: target specific option mismatch
184 | ~allocator() _GLIBCXX_NOTHROW { }
| ^
In file included from /usr/include/c++/13/vector:67,
from /usr/include/c++/13/functional:64,
from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:53:
/usr/include/c++/13/bits/stl_bvector.h:590:14: note: called from here
590 | struct _Bvector_impl
| ^~~~~~~~~~~~~
ソースコード
#ifndef DEBUG
#pragma GCC target("avx2")
#pragma GCC optimize("Ofast,unroll-loops")
#endif
#include <bits/stdc++.h>
#include <atcoder/all>
#define rep(i, n) for (int i = 0; i < n; i++)
#define ALL(a) a.begin(), a.end()
#define vc vector
#define ll long long
using namespace std;
using namespace atcoder;
using mint = modint998244353;
constexpr int INF = 3e5 + 2023;
mint fac[INF + 1];
mint fin[INF + 1];
void solve()
{
fac[0] = 1;
for (int i = 1; i <= INF; i++)
fac[i] = i * fac[i - 1];
fin[INF] = fac[INF].inv();
for (int i = INF; i > 0; i--)
fin[i - 1] = i * fin[i];
int n;
cin >> n;
for (int i = 0; i <= n; i++)
{
mint ans = mint(i).pow(n - i) * fin[n - i];
if ((n - i) % 2)
ans *= -1;
cout << ans.val() << '\n';
}
}
int main()
{
// srand((unsigned)time(NULL));
cin.tie(nullptr);
ios::sync_with_stdio(false);
cout << fixed << setprecision(13);
solve();
return 0;
}
遭難者