This documentation is automatically generated by competitive-verifier/competitive-verifier
// @brief Characteristic Polynomial
#define PROBLEM "https://judge.yosupo.jp/problem/characteristic_polynomial"
#pragma GCC optimize("O3,unroll-loops")
#pragma GCC target("avx2")
#define CP_ALGO_MAXN 1 << 10
#include <bits/stdc++.h>
//#include "blazingio/blazingio.min.hpp"
#include "cp-algo/linalg/frobenius.hpp"
using namespace std;
using namespace cp_algo::math;
using namespace cp_algo::linalg;
const int64_t mod = 998244353;
using base = modint<mod>;
using polyn = poly_t<base>;
void solve() {
size_t n;
cin >> n;
matrix<base> A(n);
A.read();
auto blocks = frobenius_form(A);
reduce(begin(blocks), end(blocks), polyn(1), multiplies{}).print();
}
signed main() {
//freopen("input.txt", "r", stdin);
ios::sync_with_stdio(0);
cin.tie(0);
int t = 1;
//cin >> t;
while(t--) {
solve();
}
}
Traceback (most recent call last):
File "/home/runner/.local/lib/python3.12/site-packages/competitive_verifier/oj_resolve/resolver.py", line 181, in resolve
bundled_code = language.bundle(path, basedir=basedir)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/.local/lib/python3.12/site-packages/competitive_verifier/oj/verify/languages/cplusplus.py", line 252, in bundle
bundler.update(path)
File "/home/runner/.local/lib/python3.12/site-packages/competitive_verifier/oj/verify/languages/cplusplus_bundle.py", line 327, in update
assert len(lines) == len(uncommented_lines)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError
| Env | Name | Status | Elapsed | Memory |
|---|---|---|---|---|
| g++ | example_00 |
|
4 ms | 4 MB |
| g++ | example_01 |
|
4 ms | 4 MB |
| g++ | example_02 |
|
4 ms | 4 MB |
| g++ | max_det_zero_random_00 |
|
72 ms | 14 MB |
| g++ | max_det_zero_random_01 |
|
69 ms | 14 MB |
| g++ | max_det_zero_random_02 |
|
68 ms | 14 MB |
| g++ | max_det_zero_random_03 |
|
69 ms | 14 MB |
| g++ | max_random_00 |
|
69 ms | 14 MB |
| g++ | max_random_01 |
|
68 ms | 14 MB |
| g++ | max_random_02 |
|
68 ms | 14 MB |
| g++ | max_random_03 |
|
68 ms | 14 MB |
| g++ | max_zero_00 |
|
70 ms | 13 MB |
| g++ | nontrivial_frobenius_form_00 |
|
89 ms | 13 MB |
| g++ | nontrivial_frobenius_form_01 |
|
88 ms | 13 MB |
| g++ | nontrivial_frobenius_form_02 |
|
78 ms | 13 MB |
| g++ | nontrivial_frobenius_form_03 |
|
74 ms | 13 MB |
| g++ | nontrivial_frobenius_form_04 |
|
70 ms | 13 MB |
| g++ | nontrivial_frobenius_form_05 |
|
68 ms | 14 MB |
| g++ | nontrivial_frobenius_form_06 |
|
69 ms | 13 MB |
| g++ | nontrivial_frobenius_form_07 |
|
68 ms | 13 MB |
| g++ | nontrivial_frobenius_form_08 |
|
69 ms | 13 MB |
| g++ | nontrivial_frobenius_form_09 |
|
70 ms | 13 MB |
| g++ | small_multiple_root_00 |
|
4 ms | 4 MB |
| g++ | small_multiple_root_01 |
|
4 ms | 4 MB |
| g++ | small_random_00 |
|
4 ms | 4 MB |
| g++ | small_random_01 |
|
4 ms | 4 MB |
| g++ | small_random_02 |
|
4 ms | 4 MB |
| g++ | small_random_03 |
|
4 ms | 4 MB |