This documentation is automatically generated by competitive-verifier/competitive-verifier
// @brief System of Linear Equations
#define PROBLEM "https://judge.yosupo.jp/problem/system_of_linear_equations"
#pragma GCC optimize("O3,unroll-loops")
#pragma GCC target("avx2")
#include <bits/stdc++.h>
//#include "blazingio/blazingio.min.hpp"
#include "cp-algo/linalg/matrix.hpp"
using namespace std;
using namespace cp_algo::linalg;
using namespace cp_algo::math;
const int64_t mod = 998244353;
void solve() {
int n, m;
cin >> n >> m;
matrix<modint<mod>> A(n, m), b(n, 1);
A.read();
b.read();
auto x = A.solve(b);
if(!x) {
cout << -1 << "\n";
} else {
auto [sol, basis] = *x;
cout << basis.n() << "\n";
sol.print();
basis.print();
}
}
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_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 |
|
5 ms | 4 MB |
| g++ | fullrank_00 |
|
14 ms | 6 MB |
| g++ | fullrank_01 |
|
14 ms | 6 MB |
| g++ | fullrank_02 |
|
10 ms | 5 MB |
| g++ | fullrank_no_solution_00 |
|
14 ms | 6 MB |
| g++ | fullrank_no_solution_01 |
|
14 ms | 6 MB |
| g++ | fullrank_no_solution_02 |
|
9 ms | 5 MB |
| g++ | hack_00 |
|
17 ms | 7 MB |
| g++ | hack_01 |
|
12 ms | 5 MB |
| g++ | hack_02 |
|
15 ms | 6 MB |
| g++ | hack_03 |
|
6 ms | 4 MB |
| g++ | hack_04 |
|
10 ms | 5 MB |
| g++ | hack_05 |
|
14 ms | 6 MB |
| g++ | lowrank_00 |
|
30 ms | 9 MB |
| g++ | lowrank_01 |
|
33 ms | 9 MB |
| g++ | lowrank_02 |
|
23 ms | 10 MB |
| g++ | lowrank_03 |
|
35 ms | 11 MB |
| g++ | lowrank_04 |
|
26 ms | 9 MB |
| g++ | lowrank_05 |
|
34 ms | 10 MB |
| g++ | max_00 |
|
44 ms | 10 MB |
| g++ | max_01 |
|
42 ms | 10 MB |
| g++ | max_02 |
|
41 ms | 10 MB |
| g++ | random_00 |
|
14 ms | 5 MB |
| g++ | random_01 |
|
11 ms | 5 MB |
| g++ | random_02 |
|
14 ms | 6 MB |
| g++ | random_03 |
|
11 ms | 5 MB |
| g++ | random_04 |
|
10 ms | 5 MB |