제출 #1239289

#제출 시각아이디문제언어결과실행 시간메모리
1239289farukCrossing (JOI21_crossing)C++20
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> #define all(a) a.begin(), a.end() using namespace std; typedef __uint128_t ll; typedef pair<ll, ll> pii; const ll P = 23; const ll mod2 = 1e16 + 7; const ll mod1 = 1e15 + 9; const ll maxn = 3e5; ll merge(ll l, ll r, ll v1, ll v2, ll mod, vector<ll> &powp) { return ((powp.at(r - l + 1) * v2) % mod + v1) % mod; } map<char, ll> trans = {{'J', 43}, {'O', 39}, {'I', 53}}; struct seggy { ll mod; ll n; vector<ll> seg, lazy, powp, csum; seggy() {} seggy(ll n, ll mod) : mod(mod), n(n), seg(vector<ll>(4 * n)), lazy(vector<ll>(4 * n)) { powp = csum = vector<ll>(maxn, 1); for (ll i = 1; i < maxn; i++) powp.at(i) = powp.at(i - 1) * P % mod; csum.at(0) = 0; for (ll i = 2; i < maxn; i++) csum.at(i) = (csum.at(i - 1) + po

컴파일 시 표준 에러 (stderr) 메시지

Main.cpp:30:46: error: expected '}' at end of input
   30 |             csum.at(i) = (csum.at(i - 1) + po
      |                                              ^
Main.cpp:19:14: note: to match this '{'
   19 | struct seggy {
      |              ^
Main.cpp: In constructor 'seggy::seggy(ll, ll)':
Main.cpp:30:44: error: 'po' was not declared in this scope; did you mean 'pow'?
   30 |             csum.at(i) = (csum.at(i - 1) + po
      |                                            ^~
      |                                            pow
Main.cpp:30:46: error: expected ')' at end of input
   30 |             csum.at(i) = (csum.at(i - 1) + po
      |                                              ^
Main.cpp:30:26: note: to match this '('
   30 |             csum.at(i) = (csum.at(i - 1) + po
      |                          ^
Main.cpp:30:46: error: expected '}' at end of input
   30 |             csum.at(i) = (csum.at(i - 1) + po
      |                                              ^
Main.cpp:24:91: note: to match this '{'
   24 |     seggy(ll n, ll mod) : mod(mod), n(n), seg(vector<ll>(4 * n)), lazy(vector<ll>(4 * n)) {
      |                                                                                           ^
Main.cpp: At global scope:
Main.cpp:30:46: error: expected unqualified-id at end of input
   30 |             csum.at(i) = (csum.at(i - 1) + po
      |                                              ^