atcoder_official's blog

By atcoder_official, history, 2 months ago, In English

We will hold AtCoder Beginner Contest 463.

We are looking forward to your participation!

  • Vote: I like it
  • -40
  • Vote: I do not like it

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

why isn't the site for atcoder ai tagged problems working properly, like many problems are missing.

»
2 months ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

Why is the announcement getting so many downvotes?

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

with over 900,000 registered users worldwide.

Hmm... but Luogu already has over two million users in China alone, so 900,000 for AtCoder isn't really that much, is it...

»
2 months ago, hide # |
 
Vote: I like it -11 Vote: I do not like it

Bad E

»
2 months ago, hide # |
 
Vote: I like it -6 Vote: I do not like it

I am a complete beginner in competitive programming, so i need the best resources for learning. If anyone knows of any, pls help me books , websites whatever best resources are you known . its must be cover basic to advanced each and every thing which is required in competative journey.

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

Very standard problems. Speedforces. What is the point of these problems? Was this an educational round?

»
2 months ago, hide # |
 
Vote: I like it +7 Vote: I do not like it

MathCoder

»
2 months ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

Short Markdown for Codeforces

There's a typo in ABC463 F editorial: Original: 1. If the champion wins a total of W+1 times Should be: 1. If the champion wins a total of W times

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

this was my first contest and I was only able to solve A and B with 6 WA how should I proceed further

  • »
    »
    2 months ago, hide # ^ |
     
    Vote: I like it +10 Vote: I do not like it

    That's a really good question! 1600 on AtCoder + CF here.

    I think I built up my skills over a very long time but there was definitely a lot of things that made it better. So I think improving in completive programming involves improving both your DSA skills and your problem solving intuition (observation).

    Although I didn't use it too much to train myself, I've read through USACO Guide and it seems great at covering all concepts you need to get to, I would say a 2000 AtCoder rating.

    However I used the ADM to get most of my algorithmics knowledge

    That and quite a bit of Leetcode. Once your algos knowledge is good, practise a lot of Leetcode: they make for a great starting point to learn a lot of competitive programming concepts with simpler (less problem solving) type questions.

    Try to aim for the following averages:

    • Easy Problems: 10 minutes

    • Medium Problems: 25 minutes

    • Hard Problems: 40 minutes

    Then you can transition into Leetcode contests which are like 90 minutes and have tricky problems that are quite similar to regular Leetcode style. At the same time you can also practise AtCoder + Codeforces.

    The thing with AtCoder and Codeforces (especially Codeforces) is that a lot of the questions require "observations", clever things you notice about the problem or what it is that you are asking that help your recognise the solution (instead of it basically being like "write this algorithm with a small variation").

    Observational skills are a bit more difficult to teach. Doing logic puzzles can help you a bit, but I think the best way to improve your comp prog observational skills is to practise with a lot of contests.

    After each contest, you should at least study the easiest question you didn't solve, reading and fully understanding the editorial before implementing it yourself (without copying any code!)

    Hope that helps :)

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

atcoder is the worst anti-AI/LLM website I've ever seen, bar none.

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

Hi, i've a doubt with today's C

my first submission was ~~~~~ // this is code void solve() { ll n;

cin >> n;

priority_queue<
pair<ll,ll>,
vector<pair<ll,ll>>
> pq;

for(ll i=0;i<n;i++)
{
    ll h, l;
    cin >> h >> l;
    pq.push({h,l});
}

map<ll,ll>mp;
ll q;
cin >> q;

vector<ll>time;
for(ll i=0;i<q;i++)
{
    ll x;
    cin >> x;
    time.push_back(x);
    mp[x] = i;
}

vector<ll>ans(q,-1);

sort(time.begin(), time.end());

for(ll i=0;i<q;i++)
{
    ll t = time[i];
    ll hi = pq.top().first;
    ll ti = pq.top().second;
    while(!pq.empty() && ti <= t)
    {
        pq.pop();
        ti = pq.top().second;
    }
    hi = pq.top().first;
    ans[mp[t]] = hi;
}

for(ll i=0;i<q;i++)
{
    cout << ans[i] << '\n';
}

} ~~~~~

why it's wrong? it passed only 10 test cases

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

    You are trying to sort the thing as per the times, but as per the constraints the times are already sorted ( L1 <= L2 <= L3 ...). Also, if the queries come as [2, 2, 4 , 6...] then the original query with L = 2 is never processed as the map overwrites it with L = 2 for the second query. Another bug is accessing top of the queue after popping. If the queue has only one element, it gets popped and there is no top left.

»
2 months ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

This user juanjuan007 may have violated the rules prohibiting the use of generative AI during contests.

Please check this Submission of G.

Although Problem G is a classic, please do not use generative AI to cheat. We must uphold what little fairness and integrity remain for competitive programming in this AI era.

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

I was solving problem G as follows: Let $$$X_i$$$ be the change in $$$|x' - X|$$$ due to $$$i^{th}$$$ move. Then final answer is $$$E(X + X_1 + X_2 + \dots X_n)$$$ = $$$X + E(X_1) + E(X_2) + \dots E(X_n)$$$. Now, $$$E(X_{i+1})$$$ is 1 if we are at position $$$X$$$ before move $$$i+1$$$ and 0 otherwise. So, $$$E(X_{i+1}) = Pr($$$ we are at position $$$X$$$ after $$$i$$$ moves) $$$ = \binom{i}{\frac{i+X}{2}} \times \frac{1}{2^i}$$$. How do I proceed from here? How to compute the sum efficiently for multiple testcases?

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

Any problems similar to E that I can solve?

  • »
    »
    2 months ago, hide # ^ |
    Rev. 3  
    Vote: I like it 0 Vote: I do not like it
    1. Flight Discount
    2. You have a graph $$$G$$$ of $$$n$$$ vertices and $$$m$$$ edges. There are $$$k$$$ candies in the whole wide world. Each vertex has an infinite supply of 1 type of candy. The vertex $$$i$$$ supplies candy $$$c_i (1 \le c_i \le k)$$$. You start at vertex $$$1$$$. Find the minimum length of a path so that you can get each type of candy and return to vertex $$$1$$$. $$$1 \le n, m \le 10^5, 1 \le k \le 8$$$
    3. Hopscotch Addict
»
2 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

The Editorial of problem E has a wrong: the condition 2 maybe "If the champion wins a total of W times" instead of "If the champion wins a total of (W+1) times"