Comments
// this is code
void solving() {
    ll n;
    cin >> n;
    vector<tuple<ll, ll, ll>> v;
    for (ll i = 0; i < n; i++) {
        ll a, b, c;
        cin >> a >> b >> c;
        v.emplace_back(a, b, c);
    }

    ll q;
    cin >> q;
    while (q--) {
        ll x;
        cin >> x;
        for (ll i = 0; i < n; i++) {
            ll a = get<0>(v[i]);
            ll b = get<1>(v[i]);
            ll c = get<2>(v[i]);
            if (a >= x) {
                x += b;
            } else {
                if (x < c) {
                    x = 0;
                } else {
                    x = x - c;
                }
            }

        }
        cout << x <<endl;

    }
}

can you guys suggest what shouldve i done to not get TLE error from my code ??

On soulllessElimination of cheaters, 10 months ago
+18

Stop being a cornball farming codeforces good points

its not about time as i can think of an approach in 10-30 mins , its actually about technique , 50% i can be going the right way and just need to pass this little riddle to solve the question in 10 mins , sometimes i go all the way of a wrong approach and start just running intuition hell until hopefully i solve it (will not lol)

i run a timer for 45 mins of brainstorming to get ideas , literally just me and the whiteboard ,i usually get the ideas in the first 10 mins either be right or false approach , so its not about time tbh its about my intuition , i feel like am very close but just have this little bump that if i get past ill solve more than 50% of 1200 , about solving 1200s i actually solved like 17 1200s in the wrong way and went back solving 1000 , back then i couldnt even think of a solution lol and now after coming back i feel like im getting way too close to the answer so why would i step back

yup ur right

0

upvoted because i literally wrote a blog the same time as u are and we both closely struggling to the same thing , a practice strategy

thanks a lot

do u have a site that goes deep into primes/gcd/lcm theory?

some people feel bad because others are actually putting in the work to get better unlike them so they downvote , thats my 2 cents , appreciate commenting , one of the most toxic communities i found is codeforces

woah there buddy nobody is accusing u were just suspecting nothing more !

have a good day saar <3

nice try to turn the tides on this one broski , i didint solve A , i upsolved it with a help of a friend after the contest had finished with B also

u were stuck for 50 mins but for some reason u changed the whole approach and wrote that computed like generated code in under 7 mins , codeChef does wonders in writing more than 100 lines of code huh

hoping for you to stop cheating cuz looking at ur submission for A is sus ngl

solved 0 questions but after upsolving A and B this div actually has a lot of new ideas , i like the simple implementation for them too , simple ideas but hard to figure them out , loved the div

the cheaters tho ... god damn

On voventaCodeforces Round 1032 (Div. 3), 11 months ago
-11

A B AND C had no ideas u just read the problem and figure out the implementation , specially that C one i couldn't figure out how to implement the code for 1.5 hours xD

bad div

On voventaCodeforces Round 1032 (Div. 3), 11 months ago
0

so its nice if u solved the problem , otherwise bad lol