제출 #65311

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
653112018-08-07 11:18:55zubec마상시합 토너먼트 (IOI12_tournament)C++14
100 / 100
202 ms43008 KiB
#include <bits/stdc++.h>
using namespace std;
const int N = 100100;
vector <int> g[N+N];
pair<int, int> pr[N+N];
int cnt, n, pref[N], id[N], up[N+N][20], deep[N+N];
int t[N*4], ob[N*4];
void push(int v, int l, int r){
if (ob[v] == 0)
return;
int mid = (l+r)>>1;
t[v+v] = (mid-l+1)*(ob[v]-1);
t[v+v+1] = (r-mid)*(ob[v]-1);
ob[v+v] = ob[v+v+1] = ob[v];
ob[v] = 0;
}
void update(int v, int l, int r, int tl, int tr, int x){
if (l > r || tl > r || l > tr)
return;
if (tl <= l && r <= tr){
t[v] = (r-l+1)*x;
ob[v] = x+1;
return;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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

tournament.cpp: In function 'void dfs(int, int)':
tournament.cpp:57:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for (int i = 0; i < g[v].size(); i++){
                     ~~^~~~~~~~~~~~~
tournament.cpp: In function 'int GetBestPosition(int, int, int, int*, int*, int*)':
tournament.cpp:76:9: warning: unused variable 'sz' [-Wunused-variable]
     int sz = n;
         ^~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...