Скоро Codeforces Round 1133 (Div. 1, Div. 2)! Регистрация здесь. ×

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

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

We will hold AtCoder Beginner Contest 135.

The point values will be 100-200-300-400-500-600.

We are looking forward to your participation!

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

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

LOVE AtCoder's problems! They are always of good quality! :D

UPD: and great difficulty

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

How do AtCoder beginner contests compare in difficulty to Div2/Div3?

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

    It's easier than Div3 on problems A and B, but sometimes as difficult as Div3 on problems E and F, the overall difficulty is slightly lower than Div3, personally, I believe it's going to be a interesting contest for people with rating below $$$1450$$$ on CF.

    UPD:I was wrong.

  • »
    »
    7 лет назад, скрыть # ^ |
    ← Rev. 2  
    Проголосовать: нравится +19 Проголосовать: не нравится

    The early problems on Atcoder are much easier than any problems on CF.

    However, in my opinion, the last problem (F) on ABCs is typically substantially harder than the last problem on CF Div3. I think it's harder for me to solve all problems on an ABC (I frequently don't) than all problems on a CF Div3 (I typically do, small sample size though), and since the earlier problems are harder on CF, that implies the later problems are harder on Atcoder.

    In summary, ABCs are definitely easier than CF Div2, but overall harder than a CF Div3 (if you aim to solve all problems). If you're only aiming to do the first few problems, ABCs are easier than CF Div2 and Div3 both (the first problem on last week's ABC was "input X and output 3X^2").

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

Where to see the number of people who solved a particular problem during the contest?

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

How to solve F?

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

    Concatenate $$$S$$$ with itself until it has a greater length than $$$S+T$$$. Then, using a string matching algorithm, check which positions in the first $$$S$$$ could be the start of an instance of $$$T$$$. For each of these positions, use the length of $$$T$$$ to figure out which position, modulo the size of $$$S$$$, you'd reach in the concatenated $$$S$$$ after placing a copy of $$$T$$$ starting here.

    Afterwards, the problem reduces to longest paths in a directed graph. Our nodes are the positions in $$$S$$$ and our edges connect each valid position at which we can place a copy of $$$T$$$ to the position at which the next copy of $$$T$$$ would start. If this graph contains a cycle, the answer is $$$-1$$$. Otherwise, we have longest paths in a DAG, which is a relatively standard problem.

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

This is absolutely the most difficult ABC problem I've ever seen...

Do any one know how to solve D? I tried to use a dp but failed.

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

How did you solve F(if solved)?

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

How to solve problem E?

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

I have solve 58 test cases of Problem F out of 73. Than will i get Partial Score or Not. Means at Atcoder there is any concept of partial Score.

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

I think problem E and F are put in a wrong order. I can solve F but can't E.

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

How to solve problem D ?

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

Geothermal please save us

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

I want AnandOza or Geothermal to put up an English editorial.

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

Any ideas for E. How to solve it?

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

Is this game included in rating?

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

500 and 600 problems were more difficult this time than general.

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

Geothermal How to solve problem E?

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

Can someone tell me why my F is wrong https://atcoder.jp/contests/abc135/submissions/6580972

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

Will you disqualification a user from the contest if he copy pasted other's code Geothermal? rng_58? chokudai? sigma425? I am asking this because I copyed the code from someone and want to know, will you disqualification me?

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

What is the topic of problem E? It is computational geometry? I would like to know a lot of about this kind of problem.

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

How to solve C?

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

    I store the total number of monsters in a variable say res.Then I check for each i if B[i]>A[i] then we update A[i+1] with A[i+1]-min(A[i+1],(B[i]-A[i])) because ith hero can defeat some of the (i+1)th position monsters. and for each i we have to update final A[i] value.that is max(0,A[i]-B[i]). Finally we calculate the sum of total number of monsters left say res1. So our answer is (res-res1).

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

      Hi, I know it's been 3 weeks but I've just tried the question today. About the problem, is it a greedy approach? The ith hero attacks the monsters in the ith city as many as possible, then attack the monsters in (i + 1)th city if possible.

      If that's what you meant, then my approach is just the same as you. However, my code got WA on submission. Here's the link: https://atcoder.jp/contests/abc135/submissions/6933616. Can you help me figure out what's wrong? I will try to code as what you stated above as well and see the difference.

      UPD: I figured it out! Integer overflow is gonna trigger me a lot...

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

I have one bad solution for F. (Very slow and naive)
At first, like everyone, concatenate $$$S$$$ with itself until its length greater than $$$|S|+|T|$$$. Then, we want to find the greatest number of copy of $$$T$$$ which is substring of current $$$S$$$. There are many ways to do, but to be more naive, I did binary search and $$$KMP$$$ to find it. How to know if the answer is not $$$-1$$$? There are a lot of better ways to do, but I concatenate $$$S$$$ with itself one more time and did the same thing as previous $$$S$$$.

If the answer is greater than the previous one, then the answer is $$$-1$$$. Otherwise it's our answer.

Time complexity: $$$O((|S|+|T|)log(|S|+|T|))$$$ (with a very big constant)

Not recommend to do this solution. I have to optimize lots of things to make this naive brute force get AC. Submission link:https://atcoder.jp/contests/abc135/submissions/6585502

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

I changed my mind and decided to rewrite and post my solutions. Feel free to check them out at this link!

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

Screenshot-from-2019-07-27-17-32-21-Latest
Why are Atcoder servers so slow at the start of the contest ? The tasks doesn't load for me for the start of 2 — 3 minutes of contest :((. Am I only one facing such situation or anybody else too ?

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

Can somebody give me the data of problem F? I debug for so long but WA four tests

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

Only Kotlin 1.0.0 supported? Sheesh, that's tough to work with; all the deprecations and missing features...

Though I guess the veterans here would tell me to use a "real" language like ^C(\+\+)?$ or Rust...

edit: fixed the regex

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

Could you help me solve F using z-function, I did it but it didn't pass all of test cases (only 58 test cases were passed), I guess the issue relating to handling the result -1. My submission. Thank you!