Strange that nobody posted this, but on 10th of May, 20:00 MSK SRM 620 will take place
# | User | Rating |
---|---|---|
1 | tourist | 3985 |
2 | jiangly | 3814 |
3 | jqdai0815 | 3682 |
4 | Benq | 3529 |
5 | orzdevinwang | 3526 |
6 | ksun48 | 3517 |
7 | Radewoosh | 3410 |
8 | hos.lyric | 3399 |
9 | ecnerwala | 3392 |
9 | Um_nik | 3392 |
# | User | Contrib. |
---|---|---|
1 | cry | 169 |
2 | maomao90 | 162 |
2 | Um_nik | 162 |
4 | atcoder_official | 161 |
5 | djm03178 | 158 |
6 | -is-this-fft- | 157 |
7 | adamant | 155 |
8 | Dominater069 | 154 |
8 | awoo | 154 |
10 | luogu_official | 150 |
Strange that nobody posted this, but on 10th of May, 20:00 MSK SRM 620 will take place
Name |
---|
It coincides with TOKI14 run 2
Unable to parse markup [type=CF_MARKDOWN]
Казалось бы, действительно, int — так себе аллокатор.
Me too so my score in 250 is low just discovered that function name is sort :D
so I make another function outside it called SRT then i add sort function inside it :D
actually I don't know why the writer use sort as a function name :( :(
Good example showing that
using namespace std
is not an appropriate statement in C++ program developing (though almost every contestant does it)When you're going to use multiple libraries in some project, you will figure out that using namespace really harms your program
For Div2 500, I thought that for a solution to exist, c = pa + qb, d = ra + sb, should be satisfied where p,q,r,s are integers. So, after searching I came to know that Linear Diophantine Equation is related to this. How exactly can I solve this problem using the concept of linear diophantine eqn? I know that we can solve the same problem in different ways, but I want to know if it can be solved using this algorithm, as it was the first thing that came to my mind.
Any idea on Div1 800? I thought about some dp[i][j][k] = number of solutions given the parity of the columns (i = bitmask), the current line (j) and k = the current square free part of the product (k should be compressed). Didn't find a good way of compression or a fast enough recurrence. Am I on the right path or am I overlooking something? Thanks in advance.
It's classic exercise for Gauss elimination.
You have n2 variables, 2n rows to fix parity of number of selected numbers in each row/column and then we have one additional row for each prime number which occurs in the input.
After you solve the system, you will either get contradiction or number of free variables. Answer is 2 to this number.
How to solve Div2 1000)?
I have an idea, but I don't know if it's correct. I'll try to code it, and will post UPD with results
Let's find the answer for n = 4 first. Now we can use inclusion-exclusion principle to calculate probability for at least one event (connected component with >= 4 verteces) happen.
It is more convenient to answer the complementary question of what is the probability that all connected components are of size at most 3. This can be done with a one-dimensional dynamic programming with the state being the number of vertices. To build the transitions observe that there are only three possible choices for Vertex 1: it may be in a component by itself, it may be connected to exactly one other vertex and form a component with it or it can be in a component of size 3.
any idea for div1 500?
We can use greedy algorithm, If some skill not contradict, we take this skill to sort. Take skills while it is possible. :)