Giter Site home page Giter Site logo

the-hyp0cr1t3 / cc Goto Github PK

View Code? Open in Web Editor NEW
904.0 20.0 189.0 765 KB

Everything competitive programming related - introductory guide, topics/concepts, practice problems, snippets & templates, tips & tricks and more.

Home Page: https://codeforces.com/profile/the_hyp0cr1t3

License: MIT License

C++ 100.00%
competitive-programming codeforces atcoder cses-solutions competitive-coding

cc's Introduction

cc's People

Contributors

arynkr avatar fraz-uddin07 avatar grainme avatar reptee avatar sanathkandikanti avatar tharun5 avatar the-hyp0cr1t3 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cc's Issues

Hook

Can't make the Hook plugin work.

how can i change merge and build function (lazy segment tree)

as we create merge/combine function to handle queries like sum , gcd , lcm , min , max in [l,r]
( i use kactl templete for classic )
or change [l,r]=x
how can i change in this in your lazy templete

class SegmentTree {
    typedef int T;
    static constexpr T unit = INT_MAX;        //change this {INT_MAX,INT_MIN,0}
    T fun(T a, T b) { return a & b; } // (any associative fn)
    vector<T> s; int n;
public:
    SegmentTree(int n = 0, T def = unit) : s(2 * n, def), n(n) {}
    void update(int pos, T val) {
        for (s[pos += n] = val; pos /= 2;)
            s[pos] = fun(s[pos * 2], s[pos * 2 + 1]);
    }
    T query(int b, int e) { // query [b, e)
        T ra = unit, rb = unit;
        for (b += n, e += n; b < e; b /= 2, e /= 2) {
            if (b % 2) ra = fun(ra, s[b++]);
            if (e % 2) rb = fun(s[--e], rb);
        }
        return fun(ra, rb);
    }
};  
it has fun to change accordingly

GUIDE

Can anyone guide , how to run random tree generate code.
Simply copying the code is not working,

Ferris Wheel

Location CSES/Sorting and Searching/Ferris Wheel.cpp
For n=6, x=20, weights=19, 6, 5, 2, 3, 4
We just need 2 gondolas but here your program says we need 4.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.