This documentation is automatically generated by competitive-verifier/competitive-verifier
// @brief Bernoulli Number
#define PROBLEM "https://judge.yosupo.jp/problem/bernoulli_number"
#include <bits/stdc++.h>
#pragma GCC optimize("O3,unroll-loops")
#pragma GCC target("avx2")
#include "cp-algo/math/poly/series.hpp"
#include "cp-algo/math/poly/transform.hpp"
#include "blazingio/blazingio.min.hpp"
using namespace std;
using namespace cp_algo::math;
const int mod = 998244353;
using base = modint<mod>;
using polyn = poly_t<base>;
// EGF of Bk
polyn bernoulli(size_t n) {
return inv((expx<base>(n+1) - polyn(1)).div_xk(1), n);
}
void solve() {
int n;
cin >> n;
invborel(bernoulli(n+1)).print(n+1);
}
signed main() {
//freopen("input.txt", "r", stdin);
ios::sync_with_stdio(0);
cin.tie(0);
int t = 1;
while(t--) {
solve();
}
}
Traceback (most recent call last):
File "/home/runner/.local/lib/python3.12/site-packages/competitive_verifier/oj/resolver.py", line 290, in resolve
bundled_code = language.bundle(path, basedir=basedir)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/.local/lib/python3.12/site-packages/competitive_verifier/oj/languages/cplusplus.py", line 243, in bundle
bundler.update(path)
File "/home/runner/.local/lib/python3.12/site-packages/competitive_verifier/oj/languages/cplusplus_bundle.py", line 322, in update
assert len(lines) == len(uncommented_lines)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError
| Env | Name | Status | Elapsed | Memory |
|---|---|---|---|---|
| g++ | 0_00 |
|
9 ms | 8 MB |
| g++ | 100000_00 |
|
26 ms | 15 MB |
| g++ | 10000_00 |
|
11 ms | 9 MB |
| g++ | 1000_00 |
|
8 ms | 8 MB |
| g++ | 100_00 |
|
8 ms | 8 MB |
| g++ | 1_00 |
|
8 ms | 8 MB |
| g++ | 200000_00 |
|
43 ms | 21 MB |
| g++ | 300000_00 |
|
67 ms | 32 MB |
| g++ | 400000_00 |
|
72 ms | 33 MB |
| g++ | 500000_00 |
|
75 ms | 33 MB |
| g++ | example_00 |
|
9 ms | 8 MB |