제출 #1099047

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
10990472024-10-10 12:50:05_8_8_Flooding Wall (BOI24_wall)C++17
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 5e5 + 12, MOD = (int)1e9 + 7;
int n, a[N], b[N], m, ai[N], bi[N];
ll st[N];
void add(ll &x, ll y) {
x += y;
if(x >= MOD) x -= MOD;
}
vector<ll> c;
void prec() {
for(int i = 1; i <= n; i++) {
c.push_back(a[i]);
c.push_back(b[i]);
}
sort(c.begin(), c.end());
c.resize(unique(c.begin(), c.end()) - c.begin());
m = (int)c.size();
for(int i = 1; i <= n; i++) {
ai[i] = lower_bound(c.begin(), c.end(), a[i]) - c.begin() + 1;
bi[i] = lower_bound(c.begin(), c.end(), b[i]) - c.begin() + 1;
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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

Main.cpp: In function 'void solve(bool)':
Main.cpp:147:23: error: 's' was not declared in this scope
  147 |         add(d[ai[i]], s);
      |                       ^
Main.cpp:148:23: error: '_s' was not declared in this scope
  148 |         add(d[bi[i]], _s);
      |                       ^~
Main.cpp:157:12: warning: unused variable 'K' [-Wunused-variable]
  157 |         ll K = 0;
      |            ^
Main.cpp:131:8: warning: unused variable 'ans' [-Wunused-variable]
  131 |     ll ans = 0;
      |        ^~~