Submission #1121372

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
11213722024-11-28 20:38:13epicci23Teams (IOI15_teams)C++17
0 / 100
4064 ms360364 KiB
#include "bits/stdc++.h"
#include "teams.h"
#define all(v) v.begin() , v.end()
#define sz(a) (int)a.size()
using namespace std;
const int BL = 500;
const int N = 5e5 + 5;
struct Node{
Node* lc;
Node* rc;
int sum;
Node(){
lc = rc = NULL;
sum = 0;
}
};
vector<Node*> seg;
vector<array<int,2>> v;
int n;
Node* build(int l,int r){
if(l == r) return new Node();
int m = (l + r) / 2;
Node* res = new Node();
res -> lc = build(l, m);
res -> rc = build(m + 1, r);
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

teams.cpp: In function 'int Get_Sum(int, int)':
teams.cpp:70:53: warning: conversion from '__gnu_cxx::__normal_iterator<std::array<int, 2>*, std::vector<std::array<int, 2> > >::difference_type' {aka 'long int'} to 'int' may change value [-Wconversion]
   70 |   int it = upper_bound(all(v),array<int,2>{l+1,-1}) - v.begin();
      |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...