Блог пользователя ShaoNianTongXue5307

Автор ShaoNianTongXue5307, история, 13 месяцев назад, По-английски

I find a lot of people do not know that, I think I need to introduce a technique to get the test after 1000 line (or 10000 line).

Note, it's not a troll blog.

First, pass the sample in some way, you can just check the test number and output it, as an example, this problem, we can write such code.

#include<bits/stdc++.h>.
int main() { return
    int testcase;
    std::cin >> testcase;
    if (testcase == 3) {
        std::cout << 7 << std::endl << 10 << std::endl << 9;
        return 0;
    }
}

Now, let's say you have (WA on 2 — WA on line 69) before. So you want to get the 69th test case, which is hidden because it's too far back.

You can use something like this code to see it

Now it's easy to see that the 69th test is 91 25 68.

Harshit25

Полный текст и комментарии »

  • Проголосовать: нравится
  • +16
  • Проголосовать: не нравится

Автор ShaoNianTongXue5307, 14 месяцев назад, По-английски

They spend a lot of time preparing for the contest, and you only waste two hours, which is insignificant

I forget what else to say, anyone please remind me.

Полный текст и комментарии »

  • Проголосовать: нравится
  • -25
  • Проголосовать: не нравится

Автор ShaoNianTongXue5307, история, 19 месяцев назад, По-английски

Codeforces should be about the player's ability to code, data Structures and algorithms, not the ability to play the genshin's mini-game.

Полный текст и комментарии »

  • Проголосовать: нравится
  • -66
  • Проголосовать: не нравится

Автор ShaoNianTongXue5307, 20 месяцев назад, По-английски

2 . Right click on any Latex and it will provide a settings interface.

3 . Enter Math settings → Math renderer option

5 . Try each option until it displays normally.

7 . If it still doesn't work, try close Accessibility → Assistive MathML

11 . Don't forget to thank me :P

Полный текст и комментарии »

  • Проголосовать: нравится
  • -4
  • Проголосовать: не нравится

Автор ShaoNianTongXue5307, история, 20 месяцев назад, По-английски

Today is jiangli back to Rank1 day, life's sweet and sour, recorded the trajectory of fate, the trajectory left your shadow, Rank1 came, sent you the most sincere wishes, sincerely wish you great fortune, smooth. Only people who respect themselves can be more courageous to shrink themselves, by backing off to make others whole, either foolish or wise. Dream what you want to dream, do what you want to do, because life only comes once, the opportunity will not come again. Life is short, why do we need to be concerned about gains and losses, there is love and there is a dream. Everyone has a different experience, everyone is a fresh story. Know how to cherish, the day of the storm, there is he has me also have you.

Полный текст и комментарии »

  • Проголосовать: нравится
  • -31
  • Проголосовать: не нравится

Автор ShaoNianTongXue5307, 20 месяцев назад, По-английски

https://codeforces.net/ratings/country/North%20Korea/city/Pyongyang

People like RGB_ICPC use a whole $$$\Huge\text{ten}$$$ alt to take away ratings that belong to others, which is the real cause of rating deflation.

Полный текст и комментарии »

  • Проголосовать: нравится
  • -68
  • Проголосовать: не нравится

Автор ShaoNianTongXue5307, история, 20 месяцев назад, По-английски

I know I'm having discriminated against, please don't give me a downvote, at least read the entire blog completely first.

Everyone knows that the priority queue for C++ is log n, but this is very slow, so we hope to optimize it.

Some people believe that using vjudgian theorem can help you optimize to $$$O(-1)$$$. But this is wrong. The definition of complexity is $$$O(f(x))$$$ representation, and you can find an $$$f(x)$$$ and two cons

tants $$$c_1,c_2$$$ with true run time $$$g(x)$$$ such that $$$\text{lim}_{x→\infty}\text{ }c_1f(x)\le g(x)\le c_2f(x)$$$. So essentially $$$O(-1)=O(1)$$$. The Vjudgian theorem is very difficult and cannot be run on Codeforces testers, so I won't introduce this.

Let me present a method that can be run in Codeforecs and that can be easily coded by tourist and benq. First, go offline for the first time. Offline means that you can know in advance what all operations are and give the results of all queries at the last time. For priority queues, we believe that there are two operations: (inserting a number) and (accessing and popping a minimum).

For these two operations, we will convert them into a sequence, use — 1 for pop-up operations, and use the inserted integer for insert operations. For example, for $$$[11,12,-1,3,-1]$$$, we insert $$$11$$$, insert $$$12$$$, pop up a number, insert $$$3$$$, and pop up a number. Because this is offl

ine, we can handle this in any way we like. First, we will access all non $$$-1$$$ numbers from small to large. Any smart person knows how to do this within $$$O(n)$$$ using cardinality sorting.

Subsequently, for each accessed number, we find the $$$-1$$$ closest to it and on the right, and delete this $$$-1$$$. We can easily do this by using and searching the set.

But this is still not $$$O(n)$$$, but $$$O(nα(n))$$$ As a patient with obsessive compulsive disorder, I can't stand this.

So I took the dsu operation offline again. Create a graph that treats each dsu merge operation as an edge, and the edge weight is the order in which the operation is executed. Then perform a minimum spanning tree on the graph (Klein P N, Tarjan R E. A Randomized Linear Time Algorithm for Finding Minimum Sp

anning Trees [M]. Brown University, 1993).

Then only the edges on the minimum spanning tree is valuable, and then you discover that you can solve it using four Russian algorithms.

OMG $$$O(n)$$$ heap!!!!!!!!1

Полный текст и комментарии »

  • Проголосовать: нравится
  • -64
  • Проголосовать: не нравится

Автор ShaoNianTongXue5307, 20 месяцев назад, По-английски

https://www.spoj.com/problems/BALIFE/

Because I'm not smart enough, so I don't know how to use Google.

Give me all the code, just like feeding.

Полный текст и комментарии »

  • Проголосовать: нравится
  • -68
  • Проголосовать: не нравится

Автор ShaoNianTongXue5307, история, 21 месяц назад, По-английски

Why do you need so many red and orange handles to test a div2? Do you guys really think they can give a valid opinion? You need more newbie,pupil,spclst !!!!! I couldn't even make Div2 D for this contest, I just sat there and couldn't do anything, it was really boring !!!!!!!

Полный текст и комментарии »

  • Проголосовать: нравится
  • -23
  • Проголосовать: не нравится

Автор ShaoNianTongXue5307, история, 21 месяц назад, По-английски

https://codeforces.net/blog/entry/113075

today i read this blog and found a very useful trick i will introduce it to such interval problems consider constructing a cartesian coordinate system for an interval $$$[x,y]$$$ and mapping it to the point $$$(x,y)$$$ for the query operation stated in the blog given $$$(l,r)$$$ translate to coordinate points is to ask how many points there are in a certain rectangle then the problem was transformed into a simple one then lets say mos algo put each $$$[l,r]$$$ on the axis then the problem becomes that you can go up down left right and ask for the minimum number of times to traverse all the points so that you can understand mo more intuitively lets take another example of a topic i encountered while talking with my friend my friend asked there is an array that supports swapping two numbers and querying the number of inverse pairs my friend wants to know if there is anything below $$$O(n\log^2n)$$$ just put $$$(i,a_i)$$$ to the coordinate points then the problem becomes to support modifying the coordinates of a point and querying the number of points inside a rectangle it is impossible to go below $$$O(n\log^2n)$$$ you can see that this trick is very helpful to think about the problem try using this method of thinking when you encounter problems with interval bounded comparisons

I hope you enjoy my blog!!!

Полный текст и комментарии »

  • Проголосовать: нравится
  • -14
  • Проголосовать: не нравится

Автор ShaoNianTongXue5307, история, 22 месяца назад, По-английски

If you think the editorial or your own solution is too complex, you can find the simplest submission record of this question through Solution Size, Many people don't know this.

For example, we can find a code that last div1 C without segment tree

https://codeforces.net/contest/1785/status?order=BY_PROGRAM_LENGTH_ASC

I hope you like my blog and subscribe to my channel.

Полный текст и комментарии »

  • Проголосовать: нравится
  • -30
  • Проголосовать: не нравится