제출 #999531

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
9995312024-06-15 17:26:32cadmiumsky자리 배치 (IOI18_seats)C++17
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h>
#include "seats.h"
#define all(x) (x).begin(),(x).end()
using namespace std;
using pii = pair<int,int>;
#define sz(x) ((int)(x).size())
template<typename Node>
struct AINT {
vector<Node> aint;
int n;
void init(int n_) {
n = n_;
aint.assign(2 * n + 5, Node());
}
template<class CB> void walk(CB&& cb) { walk(cb, 0, n); }
template<class CB> void walk(CB&& cb, int l, int r) { walk(cb, l, r, 1, 0, n); }
template<class CB> void walk(CB&& cb, int l, int r, int node, int cl, int cr) {
if(cr < l || r < cl) return;
if(l <= cl && cr <= r && !cb(aint[node], cl, cr)) return;
int mid = (cl + cr) >> 1, L = node + 1, R = node + (mid - cl + 1) * 2;
aint[node].push(aint[L], aint[R]);
walk(cb, l, r, L, cl, mid);
walk(cb, l, r, R, mid + 1, cr);
aint[node].pull(aint[L], aint[R]);
}
};
 
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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

seats.cpp: In lambda function:
seats.cpp:115:31: error: no match for 'operator=' (operand types are 'nmns' and 'std::pair<int, int>')
  115 |       val.val = make_pair(0, 1);
      |                               ^
seats.cpp:34:8: note: candidate: 'nmns& nmns::operator=(const nmns&)'
   34 | struct nmns : pii {
      |        ^~~~
seats.cpp:34:8: note:   no known conversion for argument 1 from 'std::pair<int, int>' to 'const nmns&'
seats.cpp:34:8: note: candidate: 'nmns& nmns::operator=(nmns&&)'
seats.cpp:34:8: note:   no known conversion for argument 1 from 'std::pair<int, int>' to 'nmns&&'