제출 #226482

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
2264822020-04-23 23:43:27AQTElection Campaign (JOI15_election_campaign)C++14
100 / 100
248 ms41208 KiB
#include <bits/stdc++.h>
using namespace std;
struct node{
int l, r;
long long tot, lzy;
};
int N, M;
vector<int> graph[100005];
vector<pair<long long, pair<int, int>>> v[100005];
int par[20][100005];
int lft[100005], rht[100005], t=0;
node seg[1000000];
long long dp[100005];
long long tot[100005];
void pd(int idx){
if(seg[idx].lzy){
seg[2*idx].lzy += seg[idx].lzy;
seg[2*idx+1].lzy += seg[idx].lzy;
seg[2*idx].tot += seg[idx].lzy;
seg[2*idx+1].tot += seg[idx].lzy;
seg[idx].lzy = 0;
}
}
void build(int l, int r, int idx){
seg[idx].l = l, seg[idx].r = r;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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

election_campaign.cpp: In function 'void build(int, int, int)':
election_campaign.cpp:34:13: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
  int mid = l+r>>1;
            ~^~
election_campaign.cpp: In function 'void upd(int, int, long long int, int)':
election_campaign.cpp:46:23: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
  int mid = seg[idx].l + seg[idx].r >> 1;
            ~~~~~~~~~~~^~~~~~~~~~~~
election_campaign.cpp: In function 'long long int get(int, int)':
election_campaign.cpp:64:33: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
  get(p, 2*idx + (p > seg[idx].l + seg[idx].r >> 1));
                      ~~~~~~~~~~~^~~~~~~~~~~~
election_campaign.cpp:65:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
#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...