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

Автор chokudai, история, 4 года назад, По-английски

We will hold AtCoder Beginner Contest 250.

The point values will be 100-200-300-400-500-500-600-600. We are looking forward to your participation!

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

»
4 года назад, скрыть # |
Rev. 2  
Проголосовать: нравится +3 Проголосовать: не нравится

I have to go in for the contest while getting berated by upperclassmen on discord (time clashes, how sad).

Still, hoping to solve 5 problems!

edit: it was hell, couldn't concentrate

»
4 года назад, скрыть # |
 
Проголосовать: нравится +2 Проголосовать: не нравится

The 250th ABC,cheers!

»
4 года назад, скрыть # |
Rev. 2  
Проголосовать: нравится +5 Проголосовать: не нравится

G is the same as CF865D. And Ex is almost the same as CF1253F.

I think AtCoder should put more effort in searching the similar problems and avoid them in the contest.

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

It seems that problem G is same as https://codeforces.me/problemset/problem/865/D

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Problem G is the same as CF865D.

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Problem D!!! idk why it gets WA! :"(

»
4 года назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

E can be solved with randomized mapping and xor hash.

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

How to do E? i was getting WA on 1 testcase.may be my approach was wrong.

»
4 года назад, скрыть # |
Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

Can F be done with two pointers and updating current area (add/minus triangle area) ? UPD : solved, I shouldn't have used double in contest

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Please Tell me how to submit a user Editorial????

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

i don't understand why constraints for $$$X_i,Y_i$$$ are too big , it isn't even guaranteed that area of polygon is less than $$$8 \cdot 10^{18}$$$ (or something)

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Problem D, p and q are both prime, or only p?

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Is there a way to get the "official" standing of AtCoder's ABC contests ?
i.e. to filter out candidates that are too strong to be scored in ABC.

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Can anyone give me a counter-case for my solution to problem E?

Thanks in Advanced :)

»
4 года назад, скрыть # |
Rev. 3  
Проголосовать: нравится 0 Проголосовать: не нравится

anyone explain task d please , one thing i understand that we need to store all prime <=1e6 using seiv

  • »
    »
    4 года назад, скрыть # ^ |
     
    Проголосовать: нравится 0 Проголосовать: не нравится

    j*i*i*i may cause overflow. I handle it by using __int128 to avoid them.

    • »
      »
      »
      4 года назад, скрыть # ^ |
       
      Проголосовать: нравится 0 Проголосовать: не нравится

      I solved using j*i*i*i, but with lots of WAs (not recommended)

      We can loop i on reverse from 1e6, then loop j to i-1 inside.

      That way we can catch overflows by breaking j loop early.

      The question is will it get TLE or not?

      Considering the sample test is 1e15 with 1e5 let's hope it won't TLE with 1e18 input.

      Prove:
  • »
    »
    4 года назад, скрыть # ^ |
     
    Проголосовать: нравится +3 Проголосовать: не нравится

    This is how I solved the problem.

    As mentioned in the problem ,we need to find the number of good numbers $$${k}$$$ such that :

    $$$\hspace{50mm} {k=p×q^3}$$$ with primes $$$\underline{p \lt q}$$$.

    The maximum value which q can reach will be when $$${p = 2}$$$ and we get :

    $$$\hspace{63mm} \displaystyle { q = {\left(\frac{k}{2}\right)}^{\frac{1}{3}}}$$$

    Thus for a upper bound on N as $$${10^{18}}$$$ : we would be considering all the primes $$${q \le 10^6}$$$ and since $$${p \lt q}$$$ we will also have $$${p \lt 10^6}$$$.

    For a given $$${n}$$$ iterate over the values of $$${q}$$$ only till the point that $$$\displaystyle {q ^ 3 \le n}$$$.

    This will avoid overflow issues as the maximum value of $$${q}$$$ is bound by $$${10^6}$$$ hence $$${q^3}$$$ won't exceed $$${10^{18}}$$$ .

    For a given $$${q}$$$ we can just find all the primes $$${p}$$$ such that :

    $$$\hspace{55mm} p \le min \left({q - 2} , {\displaystyle \frac{n}{q^3}}\right) $$$.

    This can be done using upper_bound on the primes array for each q and then we can sum the answers up to get the count of good numbers $$${k \le n}$$$