Submission #623574

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
6235742022-08-06 02:03:53ACGNDistributing Candies (IOI21_candies)C++17
29 / 100
2367 ms798436 KiB
#include<bits/stdc++.h>
using namespace std;
//#define int long long
#define vi vector<int>
#define pii pair<int,int>
#define vii vector<pii>
#define pb push_back
#include "candies.h"
const int MAX = 1<<30;
struct Node {
int val,lazy,l,r,sl,sr;
Node(int lb,int rb) {
val=0;lazy=-1;l=-1;r=-1;sl=lb;sr=rb;
}
Node() {
val=0;lazy=-1;l=-1;r=-1;sl=0;sr=MAX;
}
};
struct ilst {
vector<Node> vn;
int val = 0;
ilst() {
vn.pb(Node());
}
void push(int pos) {
//cout<<"p("<<pos<<") ";
int lh=vn[pos].sl;
int rh=vn[pos].sr;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

candies.cpp: In member function 'int ilst::_bs(int, int)':
candies.cpp:76:13: warning: unused variable 'dest' [-Wunused-variable]
   76 |         int dest;
      |             ^~~~
candies.cpp: In function 'std::vector<int> distribute_candies(std::vector<int>, std::vector<int>, std::vector<int>, std::vector<int>)':
candies.cpp:135:19: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  135 |     for (int i=0;i<c.size();i++) {
      |                  ~^~~~~~~~~
candies.cpp:109:9: warning: unused variable 'n' [-Wunused-variable]
  109 |     int n = c.size();
      |         ^
#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...