Submission #596108

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
5961082022-07-14 11:41:11keta_tsimakuridzeDistributing Candies (IOI21_candies)C++17
0 / 100
5063 ms17424 KiB
#include "candies.h"
#include<bits/stdc++.h>
#define pii pair<int,int>
#define f first
#define s second
using namespace std;
#include <vector>
const int N = 3e5 + 5;
int lz[4 * N], f[N];
pii MX, MN;
struct node{
int hi, idh;
int lo, idl;
} t[4 * N];
node merge(node a, node b) {
node c;
if(a.hi <= b.hi) swap(a, b);
c.hi = a.hi, c.idh = a.idh;
if(a.lo >= b.lo) swap(a, b);
c.lo = a.lo, c.idl = a.idl;
return c;
}
void build(int u,int l,int r) {
if(l == r) {
t[u].idl = t[u].idh = l;
return;
}
int mid = (l + r) / 2;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

candies.cpp: In function 'void upd(int, int, int)':
candies.cpp:78:9: warning: statement has no effect [-Wunused-value]
   78 |     for(id; id <= n; id += id & (-id)) f[id] += v;
      |         ^~
candies.cpp: In function 'int get(int)':
candies.cpp:82:9: warning: statement has no effect [-Wunused-value]
   82 |     for(id; id >= 1; id -= id & (-id)) ans += f[id];
      |         ^~
#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...