atcoder_official's blog

By atcoder_official, history, 18 months ago, In English

We will hold Toyota Programming Contest 2024#11(AtCoder Beginner Contest 379).

We are looking forward to your participation!

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

| Write comment?
»
18 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

I want to ask how can come up with the solution in a short time. Sorry for my weak English.

»
18 months ago, hide # |
 
Vote: I like it +8 Vote: I do not like it

GL && HF!

»
18 months ago, hide # |
 
Vote: I like it +13 Vote: I do not like it

Today is my birthday!

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

C is way much harder than a 300-score problem, I think it worth at least 400.

»
18 months ago, hide # |
 
Vote: I like it +9 Vote: I do not like it

F was beautiful!

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

For E, my only observation is:

For some number, says, 349685

Ans = 333333 + 2 * 44444 + 3 * 9999 + 4 * 666 + 5 * 88 + 6 * 5

But this will definitely get TLE, so how the hell did u guys manage to solve it?

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

I unaccepted C at about 20:30,and I dont accept so far,but I dont know why I unaccepted.

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

Why bruteforce works for D? Solution

  • »
    »
    18 months ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    During he contest, I thought that was the intended solution. It works because a plant only be harvest(count/delete) for once.

    • »
      »
      »
      18 months ago, hide # ^ |
       
      Vote: I like it 0 Vote: I do not like it

      I think it should TLE. Eg a case where the first 1e5 queries are type 1, and the next 1e5 queries are type 2. Even if you compress Type 2 queries, should still TLE if you alternate between type 1 and type 2 queries...

      • »
        »
        »
        »
        18 months ago, hide # ^ |
        Rev. 2  
        Vote: I like it 0 Vote: I do not like it

        sorry, I missunderstood the OP's solution.

        But if the second operation was changed to something similar to lazy tag(then you insert -tag, and delete >= H-tag), then it works.

»
18 months ago, hide # |
Rev. 2  
Vote: I like it 0 Vote: I do not like it

How to solve E? My approach is to consider the contribution of each digit, but used High Precision which caused TLE. :(

  • »
    »
    18 months ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it
    • I used the idea to "simulate how we simply add two or more numbers."
    • We will find the answer from last position to first position. First, store the contributions of all the digits.
    • For example:- In string 379 , 3 will come to the last position 1 time (Only 3), 7 will come to the last position 2 times(37 and 7), and 9 will come to the last position in some substring 3 times(379,79 and 9). Or we can say s[i] contribution to last position will be i+1 (0-based indexing).
    • Now, We will build the answer from last position from last position to first position. For this, we need to store "carry" term. After we process position i, we will delete the contribution of s[i] digit. At last, we will add if any carry left.
    • Submission Link — https://atcoder.jp/contests/abc379/submissions/59605521
»
18 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

My bad for not checking conditions, but still not to sort input in C was totally unnecessary :(

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

felt F was a next greatest ele problem but got confused from the testcases?

Example:

2 1 4 3 5

query: 1 and 2

expected ans: 2 (buildings with heights 3 and 5)

how is 1 able to see 3 and 5 ? isn't it blocked by 4 (building 3)

  • »
    »
    18 months ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    You misread the example. It is building index 3 and 5 (not height) that can be seen. Building index 3's height is 4 and building index 5's height is 5.

»
18 months ago, hide # |
Rev. 2  
Vote: I like it 0 Vote: I do not like it

Can someone help with finding what's wrong with my submission for problem C https://atcoder.jp/contests/abc379/submissions/59600147

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

Why no blog of ABC380 yet?