제출 #511042

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
5110422022-01-15 04:49:03CodeTiger927휴가 (IOI14_holiday)C++17
47 / 100
5062 ms51340 KiB
using namespace std;
#include <iostream>
#include <vector>
#include <algorithm>
#define MAXN 100005
pair<long long,int> add(pair<long long,int> a,pair<long long,int> b) {
if(a.first == 0) return b;
if(b.first == 0) return a;
return make_pair(a.first + b.first,a.second + b.second);
}
int cnt;
struct node {
int lp,rp;
pair<long long,int> v;
} nodes[20 * MAXN];
int build_node(int l,int r) {
int owo = cnt;
node& uwu = nodes[cnt++] = node{-1,-1,{0,0}};
if(l == r) return owo;
int m = (l + r) >> 1;
uwu.lp = build_node(l,m);
uwu.rp = build_node(m + 1,r);
return owo;
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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

holiday.cpp: In function 'int get_node(int, int)':
holiday.cpp:34:8: warning: unused variable 'uwu' [-Wunused-variable]
   34 |  node& uwu = nodes[cnt++] = node{lp,rp,add(nodes[lp].v,nodes[rp].v)};
      |        ^~~
holiday.cpp: In function 'int get_node(std::pair<long long int, int>)':
holiday.cpp:40:8: warning: unused variable 'uwu' [-Wunused-variable]
   40 |  node& uwu = nodes[cnt++] = node{-1,-1,v};
      |        ^~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...