Comments

For the path $$$u,v(in_u \lt in_v)$$$, if $$$u$$$ is not an ancestor of $$$v$$$ and we use our unchanged euler sequence, $$$u \to u'$$$ will have a coefficent of $$$-1$$$ and $$$v \to v'$$$ will be $$$1$$$, then we multiply $$$[out_u,out_{u'}]$$$ by $$$-1$$$ can fix this issue.

$$$u'$$$ is the second vertex from $$$\text{lca}(u,v)\to u$$$, same for $$$v'$$$. There is still only $$$O(1)$$$ ranges.

Thank you for your solution!

First consider a brute force for chain: $$$u = 1, 2, \dots, n$$$
(in this order!) for every path that contains $$$u$$$, for every other nodes $$$v$$$ lie on the path, let $$$c_{a_v} \leftarrow c_{a_v} + 1$$$, then for $$$k = 1, 2, \dots, q$$$, let $$$ans_i \leftarrow c_{b_k - a_u}$$$, and the complexity is $$$O(nm + nQ)$$$, this can pass Subtask 2,6,8.

We can split into $$$\sqrt{n}$$$ blocks and change the update-query complexity to $$$O(\sqrt{n})-O(\sqrt{n})$$$ and can pass $$$Q = 1$$$.

For tree, we can use euler order to reduce the problem to chain.

I only know how to solve Subtask 1~8, don't know how to solve the whole problem.

Thank you for your reply! I know the solution now.

How to solve casino and teleporter?

fake_banana will win IOI 2026!

There is a determined solution for problem D.

Why nonsensical? I think D,E are good.

The difficulty gap between C and D is tooo big.

I solved D in the same way.

I knew the condition is related to the central grids, and I just took a central rectangle(the size was big enough, like $$$16 \times 16$$$) and run brute force and passed.

So can anyone prove what size of rectangle is enough?

AtCoder's point values sum (×)

Another ACM-ICPC mode (√)

Thank you! I think I understand this problem now.

In the Problem B, how to prove it's always exist a $$$f(A_1, A_2, \dots, A_n)$$$ jump that corresponds the optimal jump of $$$f(A_1, A_2 - A_1, \dots, A_n - A_1) + A_1$$$ without violating the third condition(Never jump consecutively the same distance in different directions.)?

Thank you!

The round I reach GM.

Ridiculous.

We can think about one thing. If GPT really has the ability to get 6th place in IOI, why don't they send it just after the IOI day 2 ended?

On tsg11Perhaps an IGM cheater?, 9 months ago
0

I think this is abnormal. People may use different IO ways, but change this in ~30s is strange.

On NajmuddinSabrIOI 2025 tasks, 9 months ago
+8

Maybe the reason is, mosaic is an original problem? (https://atcoder.jp/contests/arc107/tasks/arc107_e)

I can't agree with you more.

On macaquedevCheating, 2 years ago
+2
#include <bits/stdc++.h>
#define ll long long
#include <iostream>
using namespace std;
#include <algorithm>
const int MX = 1e5 + 10;
string P;
vector<int> C[MX];
vector<int> dp1(MX),dp2(MX);
(i < n ? a[i] : b[a[i - n]]);}sort(a.begin(), a.end());
void dfs(int r = 0){dp1[r] = 0;dp2[r] = 0;for(auto i : C[r]){{dfs(i);dp1[r] += min(dp2[i]+1, dp1[i]);dp2[r] += min(dp1[i]+1, dp2[i]);}}if(P[r] == 'S'){dp1[r] = 1e6;
}else if(P[r] == 'P'){dp2[r] = 1e6;}}void solve(){int n;cin>>n;int te;for(int i = 0;i<n;i++){C[i].clear();if(i != 0){cin>>te;C[te-1].push_back(i);}}cin>>P;dfs();cout<<min(dp1[0],dp2[0])<<"\n";}
signed main(){ll t;cin>>t;while(t--){solve();cout<<endl;}}

The Real Code.

On tzc_wkIOI2024 China Team, 2 years ago
+31

Beacause this is realskc's last contest. He will go to university in the next year.

On tzc_wkIOI2024 China Team, 2 years ago
+36

JoesSR has chance but realskc doesn't.

On ace5Codeforces Round #922 (Div. 2), 2 years ago
0

53 points to master. Hope to be a master tonight!

0

Hope to be a Master this round!

ok

Why I can't see the Editorial? When I click the "Editorial", it just tell me "You are not allowed to view the requested page".

thx

Hope to be candidate master tonight! (last round I dropped to expert lol)

+8

Why don't start system test immediately ?

Yes. My submission of F(21:08) was "WJ" for about 10 minutes.

IOI-OI Format :(

Don't DDoS AtCoder Please !!! Please !!! Please !!!

I have 192 points to candidate master, hope to get more rating points tonight.