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

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

We will hold AtCoder Beginner Contest 175.

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

We are looking forward to your participation!

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

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

chokudai Please upload the English editorials so that we noobs can learn from them. Still waiting for this one's.

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

The contest starts in ~40 mins, see you on the leaderboard :)

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

How to solve F?

  • »
    »
    6 лет назад, скрыть # ^ |
     
    Проголосовать: нравится +13 Проголосовать: не нравится
    Solution for F
    • »
      »
      »
      6 лет назад, скрыть # ^ |
       
      Проголосовать: нравится +14 Проголосовать: не нравится

      Actually only prefix or suffix of given strings can be the "remaining part", so the number of nodes is just O($$$N * \max|S|$$$)

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

      Hi,

      How can you tell when it's impossible to form a palindrome string from Dijkstra? From your demonstration, you have a finite amount of states to explore, so after running them out you would print -1.

      I get that you have to choose a string at most once for a certain half. (from 21 choose 2, either is a palindrome or not, so it's not worth putting it in both halves), but still, you would have to reuse them in a way that is hard to implement.

      Thank you!

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

How to remove TLE in D? My code gives TLE due to large K but how can i make my solution batter? any hints will help alot.thanks in advance!

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

Should have rushed for E before D.

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

please, anyone, find what's bug in my solution in D (it's giving WA on 4/42 test cases)

https://atcoder.jp/contests/abc175/submissions/15952579

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

Getting 4 cases wrong on D. Can anyone suggest any corner case I am failing to include? Thank you :)

Submission

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

Crap

Same 4/44 WA in D as people above

And failed to fit E into timelimits with python

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

In E, we cant greedily chose the value to be taken. How to go ahead with the DP approach ?

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

please can anyone try to explain E? I tried using dp and got 10 WA. made dp[r][c][4]. dp[i][j][0], dp[i][j][1], dp[i][j][2] for storing 3 greatest value in row and dp[i][j][3] for storing max sum obatined till r-1 rows. Here is my submission.

Can anyone tell what's wrong in my solution?

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

Getting WA on D in 4 Test Cases...Can anyone help me out here? Link: https://atcoder.jp/contests/abc175/submissions/15955049

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

Missing AnandOza and Geothermal's editorial.

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

In problem C-

using

if((x-k*d)>=0)
cout<<(x-k*d)<<endl;

gives WA on 10 tcs but using

if(x/d>=k)
cout<<(x-k*d)<<endl;

gives AC.

Can someone plz help, by giving an example where the 1st one fails.

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

how can i print any index value of a set???? it's possible in c++????

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

So, How to solve F?

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

I am getting WA on 2 test cases in problem D.

My solution

It's on test case 2 and 22.

Anyone else got the same error ? Someone please tell me where have done the error.

UPD: I was taking the maximum answer in the prefix of the cycle before even considering what the value of k is.

How silly of me :'-(

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

For D :

Took me couple of "ifs" to code correct logic Submission.

Can someone explain better way to do this?

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

Getting WA on D in 3 Test Cases...Can anyone help me out here? Link: WA on TC 7,11,22

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

How to solve C?

  • »
    »
    6 лет назад, скрыть # ^ |
     
    Проголосовать: нравится +10 Проголосовать: не нравится
    Fully Commented Code
»
6 лет назад, скрыть # |
 
Проголосовать: нравится +32 Проголосовать: не нравится

My screencast of the round, where I clutch out F, draw an ugly chocolate bar for a grid, and explain solutions to all problems (A-F) in video format.

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

    Thanks for the screencast. In problem D , what's the use of below code, why only the first f0r(i, n) doesn't work ?

    if (cval > 0) {
    		cur += (k / csize - 1) * cval;
    		rem %= csize;
    		rem += k;
                  }
    
    • »
      »
      »
      6 лет назад, скрыть # ^ |
       
      Проголосовать: нравится +4 Проголосовать: не нравится

      The way of implementing I describe in the solutions is better than what my code represents, and that edge case doesn't arise. What I did in the code was, instead of counting the number of possible cycles after fixing the last few moves, I first made as many cycles as possible then found the best way to make the last few moves. This is wrong because it may make one too many cycles.

      The test case I find in the video which makes that part of code necessary is:

      3 7
      2 3 1
      13 15 -27
      

      where the optimal strategy is to start at position $$$3$$$, ride the cycle once, then end at position $$$2$$$ ($$$5$$$ moves). Without that section, the code won't even consider that as a possibility, and instead start at $$$1$$$, make two cycles, and end at $$$2$$$ ($$$7$$$ moves).

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

Am I the only one who gets demotivated by questions like todays D?

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

Can anyone help me with this submission on problem D? It gave WA in only two cases. I have no idea what's wrong with this :(

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

Getting runtime error for some big cases for problem E can anyone tell what's wrong with this

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

I wrote an unofficial editorial from problem A to E. If you have any question, please give me comments and let me know. I’m going to write unofficial editorials for ABC, so don’t forget to check them out. The link for this contest is https://wordpress.com/read/feeds/108186275/posts/2862983275

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

I have AC code for D https://atcoder.jp/contests/abc175/submissions/15996588

Store values of up to 5000 moves in DP table.

If K <= 5000, you can get the maximum value from the DP table.

Otherwise, the maximum value can be found in several cases. (Checkable on link)

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

IF Anyone Need Detail explanation for D Here