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

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

We will hold AtCoder Beginner Contest 363.

We are looking forward to your participation!

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

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

GL & HF!

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

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

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

I hope I can get a good grade.

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

675 pts G! Wow!

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

Good Luck!

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

Palindromeforces

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

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

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

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

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

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

»
21 месяц назад, скрыть # |
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.

  • »
    »
    21 месяц назад, скрыть # ^ |
     
    Проголосовать: нравится +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.

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

getting 1 testcase wrong in D please help to make correction

submission:code

thanks

»
21 месяц назад, скрыть # |
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 ?

»
21 месяц назад, скрыть # |
 
Проголосовать: нравится 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; }

  • »
    »
    21 месяц назад, скрыть # ^ |
     
    Проголосовать: нравится 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.

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

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

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

How to solve F?

  • »
    »
    21 месяц назад, скрыть # ^ |
     
    Проголосовать: нравится 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

»
21 месяц назад, скрыть # |
 
Проголосовать: нравится 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.

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

How to solve D ?

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

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

  • »
    »
    21 месяц назад, скрыть # ^ |
    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$$$.

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

is D solvable by digit dp ?

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

[NEVER MIND]

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

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