This documentation is automatically generated by competitive-verifier/competitive-verifier
#define PROBLEM \
"https://judge.yosupo.jp/problem/deque_operate_all_composite"
#include <atcoder/all>
#include "daylight/base.hpp"
#include "daylight/structure/swag.hpp"
using namespace atcoder;
using mint = modint998244353;
int main() {
int Q;
cin >> Q;
using P = pair<mint, mint>;
FoldableDeque<P> D(
[](P a, P b) -> P {
return { a.first * b.first,
a.second * b.first + b.second };
},
{ 1, 0 });
while(Q--) {
int t;
cin >> t;
if(t == 0) {
int a, b;
cin >> a >> b;
D.push_front({ a, b });
} else if(t == 1) {
int a, b;
cin >> a >> b;
D.push_back({ a, b });
} else if(t == 2) {
D.pop_front();
} else if(t == 3) {
D.pop_back();
} else {
int x;
cin >> x;
cout << (D.fold().first * x + D.fold().second)
.val()
<< endl;
}
}
}
Traceback (most recent call last):
File "/home/runner/.local/lib/python3.10/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.10/site-packages/competitive_verifier/oj/verify/languages/cplusplus.py", line 252, in bundle
bundler.update(path)
File "/home/runner/.local/lib/python3.10/site-packages/competitive_verifier/oj/verify/languages/cplusplus_bundle.py", line 482, in update
self.update(
File "/home/runner/.local/lib/python3.10/site-packages/competitive_verifier/oj/verify/languages/cplusplus_bundle.py", line 477, in update
raise BundleErrorAt(
competitive_verifier.oj.verify.languages.cplusplus_bundle.BundleErrorAt: daylight/base.hpp: line 103: unable to process #include in #if / #ifdef / #ifndef other than include guards
| Env | Name | Status | Elapsed | Memory |
|---|---|---|---|---|
| g++ | example_00 |
|
6 ms | 3 MB |
| g++ | example_01 |
|
6 ms | 3 MB |
| g++ | large_max_00 |
|
361 ms | 8 MB |
| g++ | large_max_01 |
|
379 ms | 8 MB |
| g++ | large_min_00 |
|
422 ms | 3 MB |
| g++ | large_min_01 |
|
425 ms | 3 MB |
| g++ | large_triangle_00 |
|
413 ms | 4 MB |
| g++ | large_triangle_01 |
|
387 ms | 4 MB |
| g++ | max_random_00 |
|
469 ms | 9 MB |
| g++ | max_random_01 |
|
512 ms | 9 MB |
| g++ | max_random_02 |
|
477 ms | 9 MB |
| g++ | random_00 |
|
306 ms | 5 MB |
| g++ | random_01 |
|
388 ms | 5 MB |
| g++ | random_02 |
|
49 ms | 4 MB |
| g++ | small_00 |
|
6 ms | 3 MB |
| g++ | small_01 |
|
5 ms | 3 MB |