제출 #950864

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
9508642024-03-20 20:41:29MinaRagy06새 집 (APIO18_new_home)C++17
47 / 100
5056 ms242968 KiB
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define mid ((l + r) >> 1)
const int N = 300'005;
// set<array<int, 3>> gud[N];
struct segtree {
set<array<int, 3>> seg[1 << 20];
void insert(int i, int l, int r, int s, int e, array<int, 3> v) {
if (s <= l && r <= e) {
seg[i].insert(v);
return;
}
if (r < s || e < l) {
return;
}
insert(i << 1, l, mid, s, e, v);
insert(i << 1 | 1, mid + 1, r, s, e, v);
if (seg[i << 1].find(v) != seg[i << 1].end() && seg[i << 1 | 1].find(v) != seg[i << 1 | 1].end()) {
seg[i].insert(v);
seg[i << 1].erase(v);
seg[i << 1 | 1].erase(v);
}
}
void erase(int i, int l, int r, int s, int e, array<int, 3> v) {
if (s <= l && r <= e) {
seg[i].erase(v);
return;
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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

new_home.cpp: In function 'int main()':
new_home.cpp:120:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  120 |  for (int i = 0; i < v2.size(); i++) {
      |                  ~~^~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...