Submission #982140

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
9821402024-05-13 23:57:55Ivo_12Janjetina (COCI21_janjetina)C++98
110 / 110
374 ms22332 KiB
#include <bits/stdc++.h>
#define FIO ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define ll long long
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define pll pair < ll, ll >
using namespace std;
const int N = 1e5+10;
int n, k;
vector < pll > edges[N];
ll maxmass[N];
ll siz[N];
ll dep[N];
bool rip[N];
ll fenwick[N];
vector < pll > querries;
void add( int x, ll v ) {
for(x; x < N; x += x & -x) fenwick[x] += v;
return;
}
ll sum( int x ) {
ll out = 0;
for(x; x > 0; x -= x & -x) out += fenwick[x];
return out;
 
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

Main.cpp: In function 'void add(int, long long int)':
Main.cpp:23:6: warning: statement has no effect [-Wunused-value]
   23 |  for(x; x < N; x += x & -x) fenwick[x] += v;
      |      ^
Main.cpp: In function 'long long int sum(int)':
Main.cpp:29:6: warning: statement has no effect [-Wunused-value]
   29 |  for(x; x > 0; x -= x & -x) out += fenwick[x];
      |      ^
Main.cpp: In function 'long long int dac(int)':
Main.cpp:82:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<long long int, long long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   82 |    for(int j = 0; j < querries.size(); j++) {
      |                   ~~^~~~~~~~~~~~~~~~~
Main.cpp:86:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<long long int, long long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   86 |    for(int j = 0; j < querries.size(); j++) {
      |                   ~~^~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...