Comments

Based

+4

Baraa-Ahmed will win IOI 2026

Flushed kber

On TAhmed33Very hard tree problem, 3 months ago
0

Auto comment: topic has been updated by TAhmed33 (previous revision, new revision, compare).

On McDaMiaIOI 2026 Teams, 3 months ago
+15

contee will win IOI 2026!

Mina we love you

On ArpaOlympiad System in Your Country, 7 months ago
+3

Everything here is concerning the Egyptian Olympiad in Informatics (EOI).

A:

  1. Egypt

  2. A private organization governs the EOI, but the government sponsors (or used to sponsor) the EOI.

B:

  1. There is no minimum. People as young as 6th grade have participated.

  2. The online stage is usually around 100 to 200 participants.

  3. Typically, people hear about it around the high school years (grade 8+).

  4. There is no limit.

  5. There is no limit.

C:

  1. The only university that I know of which gives scholarships to competitive programmers is the Arab Academy for Science and Technology. The top universities in Egypt do not offer such scholarships.

  2. There used to be support programs in the past. Egyptian IOI medalists would win monetary prizes, or new laptops. This is no longer the case.

D:

  1. Very few students have heard about the EOI. It is not competitive.

  2. It is seen as a national achievement. The Minister of Education and other high-ranking Egyptian officials attend the final ceremony.

  3. The main motivation is to aid in admission to foreign universities and scholarships. Foreign universities are, on average, stronger than Egyptian universities, and provide better opportunities for students.(At least, for the people who attempt to qualify to the IOI. Many students participate to have fun, or because competitive programming can look good on a résumé.)

+8

Strong!

On clerisy47IEEE Xtreme 19.0, 10 months ago
0

How is "Sequence Decomposition" solved?

How does the dynamic connectivity trick solution work?

Unfair for the people in such a country who don't cheat.

Don't generalize

Deleted

+5

This is.

On iyedooPAIO 2025 Teams, 12 months ago
+16

Way too strong

+9

Strongest team

G trash casework solution: (Good means a string which can be reduced to "1")

0000: Only good is "1"

0001: Only good is all '1's

0010: Good if "1" or starts with 10 or (starts with "11" and has at least 3 1s)

0011: Good if starts with '1'

0100: Good if "1" or ends in "01" or (ends in "11" and has at least 3 1s)

0101: Good if ends in '1'

0110: Good if odd number of '1's

0111: Good if at least one '1'

1000: Bad if "0" or "01" or "10" or "11" or "000" or "101" or "111"

1001: Good if even number of '0's

1010: Bad if "0" or "01" or "11"

1011: Bad if "0" or "01111..."

1100: Bad if "0" or "10" or "11"

1101: Bad if "0" or "...111110"

1110: Bad if "0" or "11" or "101"

1111: Only bad is "0"

Can my A be judged please? It is still at "pretest passed", and my position in the standings does not include my points on problem A

Hamed_Ghaffari sweetweasel eren__

https://codeforces.me/contest/2127/submission/332803312

Update: Thanks for the help

So ignorant...

Do you plan on getting a life after these last few months?

Yeah, I am sure that the 250 million people in Pakistan are all complicit in the hate crimes. I'm sure the four guys in the IOI team are willing to engage in these hate crimes. I'm sure that insulting them and calling them terrorists is the right thing to do

This comment is a great display of your ignorance

How does that justify making racist comments about a country's IOI team?

On Mousa_AboubakerNAOI 2025 Teams, 17 months ago
+15

Egypt's team:

On AlifSrSEEid Mubarak, 17 months ago
0

Eid mubarak!

On waipoliEolymp Cup #4, 18 months ago
0

How to get a non-40 score in problem E?

Why is this downvoted

+11

mandatory Wxssim gupta_samarth orz

On stefdascaInfo1Cup 2025, 19 months ago
0

orz only 100 on Problem 6

Well, thanks for bumping my message!

On waipoliEolymp Cup #3, 21 month(s) ago
0

How to get more than 78 in problem E?

I wasn't involved in the trolling done, and I never supported it. The people behind the troll account have since reformed :)

+39

Both of my predictions are correct!

Congrats Gamal74, Drakkon, Rokba, Ahmed57, Octagons!

Any hints for problem E?

On Ra16bitMeta Hacker Cup 2024 Finalists, 21 month(s) ago
+20

TLE orz

The main difficulty was reducing the condition in the statement to $$$a_j \nmid a_i$$$ if $$$j \mid i$$$

I knew that this condition was necessary, but in contest I just guessed that it was sufficient and proceeded based on that. I'm pretty sure many others did the same.

+36

I think Gamal74, Drakkon, and Rokba will win the ACPC.

Also, Ahmed57 and Octagons will win ACPC Teens 2024!

int x = sqrt(n);

while (x * x < n) x++;

while (x * x > n) x--;

I saw this trick a while ago, and I think it is the safest option.

On TimDeeI'm IM, 21 month(s) ago
+36

M to IM to GM in two consecutive contests, inspiring!

Yeah that's sad. I think it is a good problem otherwise

Bump

I have a solution with inclusion-exclusion.

For some permutation $$$p$$$, let $$$x$$$ be the number of indices $$$i$$$ with $$$|p_i - i| = k$$$.

Let $$$f(i)$$$ be the sum over all permutations of $$$x \choose i$$$. The answer is $$$\sum_{i=0}^{n} (-1)^i f(i)$$$.

To compute $$$f(i)$$$, you can count the number of ways to choose a subset of indices of size $$$i$$$, and assign $$$p_i$$$ values to it such that all indices $$$i$$$ in the subset satisfy $$$|p_i - i| = k$$$, and multiply that by $$$(n - i)!$$$. You can compute a dp for each residue class modulo $$$k$$$, and then merge the answers of each residue class.

Is there a more simple solution?

Lol your original comment was correct

How to quickly recompute $$$f(p)$$$ in problem G?

I think Omar was included in the screenshot by mistake. He didn't submit anything. Also, your last sentence makes no sense. Does that justify cheating somehow?

Sum of $$$d_i$$$ is always $$$0$$$, so there always exists a solution for an input.

+14

They will get destroyed by the competition.

On FTS_Problem_CACPC 2024 teams, 22 months ago
0

No I love Abito more

Assume the optimal subset for a value of $$$k$$$ is not a prefix of the sorted list of leaves. Let $$$x$$$ be the first leaf in the sorted list not chosen.

If $$$h(x)$$$ has no chosen leaf in its subtree, replacing $$$x$$$ with any chosen leaf after it in the sorted order is obviously optimal.

Otherwise, let $$$y$$$ be some chosen leaf that comes after $$$x$$$ in the sorted order, such that $$$lca(x, y)$$$ is lowest possible. Let $$$z$$$ be $$$lca(x, y)$$$. Notice that $$$h(x)$$$ must be an ancestor of $$$h(y)$$$, as we said that $$$x$$$ is the first leaf not chosen. $$$z$$$ must also be a strict ancestor of $$$h(y)$$$. This means that the sum of values from $$$x$$$ to $$$z$$$ must be at least as small as the sum of values from $$$y$$$ to $$$z$$$, so choosing $$$x$$$ instead of $$$y$$$ is optimal.

Isn't this the same as my solution? I just preprocess the part of splitting over largest edge

My solution to E3:

Call a node "special" if it is one of the $$$p$$$ given nodes. Call a node "chosen" if it is one of the $$$k$$$ nodes in the chosen subset.

Build the Kruskal Reconstruction Tree (KRT) of the graph, with $$$2n - 1$$$ nodes. All nodes in the original graph are given the same label in the KRT.

For some special node $$$x$$$, let $$$y$$$ be the lowest ancestor of $$$x$$$ in the KRT with at least one chosen node in the subtree of $$$y$$$. The maximum edge weight needed to get to a chosen node from special node $$$x$$$ in the original graph, is the weight of the edge that corresponds to $$$y$$$ in the KRT.

I then transformed this problem a bit. Let $$$f(i)$$$ be the edge weight that corresponds to node $$$i$$$ in the KRT (if $$$i \leq n$$$, then $$$f(i) = 0$$$). Let $$$g(i)$$$ be the number of special leaves in the subtree of $$$i$$$ in the KRT. Let the the value of a node $$$i$$$ be $$$g(i) * (f(i) - f(par[i]))$$$. Choose $$$k$$$ leaves in the KRT, to minimize the sum of values of nodes which have at least one chosen leaf in its subtree.

This works, because the contribution of some special node $$$x$$$ will be $$$(f(y) - f(par[y])) + (f(par[y]) - f(par[par[y]])) + \dots = f(y)$$$, where $$$y$$$ is the lowest ancestor of $$$x$$$ with a special node in its subtree.

Greedy solution
DP solution

What is amazing about this contest?

An answer always exists, though. The pairing with minimum sum of segment lengths is optimal.

If there exist points P1, P2, Q1, Q2 such that P1 is paired with Q1, and P2 is paired with Q2, and segments P1 — Q1 and P2 — Q2 intersect, then pairing P1 with Q2 and P2 with Q1 will decrease the total sum of segment lengths, and remove an intersection point. If the sum of segment lengths of sum pairing is optimal, then there does not exist a pair of intersecting segments.

What must be proved is that $$$2n$$$ iterations is sufficient.

It can't be solved in better than $$$O(nm)$$$, where $$$m$$$ is the number of edges.

https://en.m.wikipedia.org/wiki/Girth_(graph_theory)#Computation

Yeah that is what I meant by monotonic queue.

I just realized that I wrote deque in the original comment lol

Couldn't you maintain a monotonic deque for the bitsets in the valid range, and remove the $$$\log n$$$ factor?

On HexagonsSneak Peak...., 23 months ago
+43

Can't wait to see another high-quality contest from you!

Aged like milk :(

On 0xF1IOI 2024 predictions, 2 years ago
+43

Octagons will win IOI 2024!

On carcinisationIOI 2024 Teams, 2 years ago
+8

Technically yes, but only Team 1 can contribute to Egypt's total medal count. Team 2 members also do not affect medal cutoffs.

On NemanjaSo2005I'm IM!, 2 years ago
0

Congratulations!

They have the same setting, but the JOISC problem is much harder

Does there exist a faster solution to problem D?

+9

So you are proud of being a troll with no life?

-10

Deleted

+13

Why? Because it forces you to think in a different way?

+11

It's been more than a month since this comment was made. Any updates?

On galen_colinWF23 Luxor, 2 years ago
0

For being the first to solve problem K.

0

I apologize for my frequent comments, but the issue has still not yet been fixed. Does anyone know how to contact the site administrators?

0

Hello, any updates? The issue persists. Registering a new account gives a similar error.

-10

Deleted

0

I can't sign in yet as well.

0

This has been happening for the past few weeks and it has not been fixed. I've tried using a VPN, registering new accounts, and logging in with my gmail, but nothing works.

Deleted

Could not code C in time :(

The only math I did was solving a cyclic recurrence relation in dp[x], for dp[x]. (Similar to https://atcoder.jp/contests/dp/tasks/dp_j ). dp[x] here is a pair which has the minimum cost for the two players, when there are x numbers not chosen.

https://dmoj.ca/problem/ccc17s5 I believe this problem can be solved with this.

gcd is bounded by 10^5.