Lomk's blog

By Lomk, history, 2 months ago, In English

This Friday (25th Mar, 2022) at 9am GMT+7, the 2021 ICPC Vietnam Regional Contest Mirror contest will take place. The link to the contest is: https://oj.vnoi.info/contest/icpc21_regional_m. The official on-site contest will start one hour earlier.

This is the first time the contest is hosted on a Vietnamese-built platform, Vietnam Online Judge. The system will require an account to join the contest, but it should be pretty straight-forward to do so (Please select the English language when you first enter the site).

On behalf of the organiser, we hope you will like the problem set as much as the effort we have put in to create it!

Update: You just need to create an account & wait for the contest to start & compete. No registration is needed. Also, there is currently no team system yet, so you can consider sharing the account for your entire team.

 
 
 
 
  • Vote: I like it
  • +83
  • Vote: I do not like it

»
2 months ago, # |
  Vote: I like it 0 Vote: I do not like it

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

»
2 months ago, # |
  Vote: I like it 0 Vote: I do not like it

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

»
2 months ago, # |
  Vote: I like it +19 Vote: I do not like it

Another judge supporting C++20 :O

»
2 months ago, # |
  Vote: I like it +3 Vote: I do not like it

It has started.

»
2 months ago, # |
  Vote: I like it +3 Vote: I do not like it

Problem I in the mirror is not setup correctly, so it's not solvable there (though it's ok in real contest). zhangguangxuan99's solution is correct, sorry about that.

»
2 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Where will i found the editorial? What was the approach for problem M? MillionPlex Problem

  • »
    »
    7 weeks ago, # ^ |
    Rev. 2   Vote: I like it +13 Vote: I do not like it

    The main point is the equality $$$(A + B)^2 = A^2 + 2AB + B^2$$$. That means if we know the sum of $$$A^2$$$ and the sum of $$$A$$$, then we can find out the sum of $$$(A+B)^2$$$ with ease.

    We will maintain 3 things, $$$cnt$$$, $$$sum$$$, and $$$sum2$$$, which are, respectively, how many characters we have considered, sum of all substrings, and sum of square of all substrings ($$$cnt$$$ is literally the iterator variable, but is just listed here for the sake of completeness). Initially all of them are $$$0$$$. Go through each character of the string from left to right, update these three info correctly as you go.

    Do ask if you need other problems.