Пожалуйста, прочтите новое правило об ограничении использования AI-инструментов. Оно применяется начиная с раунда 972. ×

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

Автор atcoder_official, история, 2 месяца назад, По-английски

We will hold AtCoder Beginner Contest 363.

We are looking forward to your participation!

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

»
2 месяца назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

GL & HF!

»
2 месяца назад, # |
  Проголосовать: нравится +22 Проголосовать: не нравится

I have a rating of 1598 and I'm sure I'm going to reach 2 Kyu this time.

»
2 месяца назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

I hope I can get a good grade.

»
2 месяца назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

I hope we can solve the ABCDEF and even G succesfully! Good luck, everyone!

»
2 месяца назад, # |
  Проголосовать: нравится +17 Проголосовать: не нравится

675 pts G! Wow!

»
2 месяца назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

Good Luck!

»
2 месяца назад, # |
  Проголосовать: нравится +43 Проголосовать: не нравится

Palindromeforces

»
2 месяца назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Palindrome, Palindrome & Palindrome XD

»
2 месяца назад, # |
  Проголосовать: нравится +5 Проголосовать: не нравится

Felt E was easier than D, spent too much time in C thinking generating all permutations would TLE :/

»
2 месяца назад, # |
  Проголосовать: нравится +30 Проголосовать: не нравится

First time among the top 5 on an Atcoder Contest! I just can't express the thrill I'm feeling when passing G!

»
2 месяца назад, # |
  Проголосовать: нравится +7 Проголосовать: не нравится

Am I just a scrub, or is Python doomed to TLE for problem C?

»
2 месяца назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

I am so happy because I got AC in Task C.

»
2 месяца назад, # |
Rev. 2   Проголосовать: нравится -7 Проголосовать: не нравится

You are right, but G is an easier version of this problem (that this problem is on a tree). I think many Chinese participants have seen this problem. (Though few people solved it) Atcoder, it's a good job and don't set problems like this again.

  • »
    »
    2 месяца назад, # ^ |
      Проголосовать: нравится +20 Проголосовать: не нравится

    Disagree with this opinion: don't set problems like this again.

    This problem('s statement) is much more beautiful than that (even if i am a Chinese, i still think the problem you mentioned is too complex for me to appreciate).

    And most of all, this is an atcoder BEGINNER contest (I do agree with that on a ARC or AGC original-idea-problem is important), reusing some beautiful ideas should be encouraged: If evan ABC could not introduce this one, how people around the world could know it.

»
2 месяца назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

getting 1 testcase wrong in D please help to make correction

submission:code

thanks

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

I solved ABCE

my approach for C is as follows

  • try all the permutations using next_permutation
  • find the palindromes' sizes using manacher's algorithm for each string in the permutations
  • find if there are any sub-palindrome of size K or no, if you didn't find one, increase the result

are there any easier solutions ?

»
2 месяца назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Why wrong D. I've checked it for one hour.

include<bits/stdc++.h>

using namespace std; typedef long long ll; ll n,cnt,l; int main(){ ios::sync_with_stdio(false); cin.tie(0),cout.tie(0); cin>>n; while(true){ l++; if(l==1){ if(n<=10){cout<<n-1; return 0;} cnt=10; }else{ ll dgt=(l+1)/2; ll sum=9*pow(10,dgt-1); if(cnt+sum<n) cnt+=sum; else{ ll nd=n-cnt; nd--; ll to=nd+pow(10,dgt-1); nd=to; string s=""; for(ll i=1;i<=dgt;i++){ if(nd%10==0) s="0"+s; else if(nd%10==1) s="1"+s; else if(nd%10==2) s="2"+s; else if(nd%10==3) s="3"+s; else if(nd%10==4) s="4"+s; else if(nd%10==5) s="5"+s; else if(nd%10==6) s="6"+s; else if(nd%10==7) s="7"+s; else if(nd%10==8) s="8"+s; else if(nd%10==9) s="9"+s; nd/=10; } cout<<s; if(l%2==1) for(ll i=s.size()-2;i>=0;i--) cout<<s[i]; else for(ll i=s.size()-1;i>=0;i--) cout<<s[i]; return 0; } } } return 0; }

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

    Put your code like this:

    ``` cpp
    #include<bits/stdc++.h>
    (more codes)
    ```
    

    or this:

    ~~~~~
    #include<bits/sdtc++.h>
    ~~~~~
    

    When you are using the wave line version, please make sure that there is at least one blanket line before and after it. No one likes reading a code like this.

»
2 месяца назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Usually, how long does AtCoder take to updating ratings? New user here

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

    I bet It takes about 1-2 hours.

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

      You're right, that's fast.

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

        I like Codeforces and Atcoder very much,because the ratings is updated very fast.But Luogu is very famous for its slow calculation of ratings.

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

          However, the rating system of Luogu is still relatively new. But I agree that it's truly slow.

          As we can see, Luogu is not specifically designed for contests. I think I don't have any objections if the rating of this round is updated just before the next Rated round.

»
2 месяца назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

How to solve F?

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

    Probably there was an easier solution, but I wrote a dp(i, val) = can we have a string of length i with product = val? The transition is just to try using a divisor and it 'reverses' when you have (val / divisor) % reverse(divisor) == 0

    In my code, I also have to fix the middle element before calling the dp

    You can check out my code here

»
2 месяца назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

For problen F, I almost have the same idea as the editorial, but couldn't figure out the complexity, and thus missed the dfs+memorizarion method.

Learned a lot from this problem, thank you so much, atcoder team!

By the way, I think the complexity could be reduced from O(sqrt(N) * number of divisors of N), to O(number of divisors of N * number of divisors of N), because it is not necessary to check every integer from 2 to sqrt(n) when calling dfs. Instead, we can just find all the divisors of n at first, and then check these divisors every time when dfs is called.

»
2 месяца назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

How to solve D ?

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

    dont think about palindrome just you have any number let say 235 then you can make two type of palindrome number from this 235532 and 23532 just this for every number

    code:code

»
2 месяца назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

https://atcoder.jp/contests/abc363/submissions/55829821 where i am doing wrong pls help problem f

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

    Same as mine (earlier submission).

    Of course, in the samples, $$$363=11\times3\times11$$$, but that's a misdirection. $$$363=363$$$ is also correct. The problem didn't force you to use asterisks.

    I found that problem during contest, and my friends have found this typical after contests: $$$114411$$$, it's just $$$114411$$$ and can't divide anymore (in the condition of the problem), but $$$114411$$$ itself is a possible string. Your program prints $$$-1$$$.

    Most of the F (WA*8) could be hacked on this number: $$$114411$$$, the correct output is $$$114411$$$.

»
2 месяца назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

I didn't solve problem F at that time,because I didn't know how to turn a long integer to a string. Now,I know "to_string()"

»
2 месяца назад, # |
  Проголосовать: нравится +5 Проголосовать: не нравится

is D solvable by digit dp ?

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

[NEVER MIND]

»
2 месяца назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Problem E, I am getting runtime error on just 1 testcase on this submission. Can anyone figure out the bug?

»
2 месяца назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

I TLE in D(cry

»
2 месяца назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

i was wondering how many 5 digit palindromes would there be for problem D. Because i think that fixing the first and last number to be the same(going from 1 to 9), the middle 3 numbers would have to be palindromes as well and we already know 3 digit palindrome count is 90. But we would count '000' as a possibility as well right? So wouldnt that make the total number of 3 digit palindromes = 90+1 = 91 in this case? and final answer would be 9*91 = 819 5 digit palindromes instead of 900??

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

In problem F, Can someone help me find why this is giving WA?

I am not able to find any corner cases My Submission

Edit: Got it. Testcase where the code was failing for reference:131072