We will hold Panasonic Programming Contest 2024(AtCoder Beginner Contest 354).
- Contest URL: https://atcoder.jp/contests/abc354
- Start Time: http://www.timeanddate.com/worldclock/fixedtime.html?iso=20240518T2100&p1=248
- Duration: 100 minutes
- Writer: MtSaka, Aotsuki
- Tester: Nyaan, math957963
- Rated range: ~ 1999
- The point values: 100-200-350-450-475-525-625
We are looking forward to your participation!








Hope to ak!
Failed to solve G...
I think problem G is a bit hader than usual.
Actually some problem G's will be harder than yesterday's
I used a strange method to solve G, and it passed: It's a kind of "Hill Climbing" that can solve the "Weighted Maximum Independent Set Problem", but I'm not sure about its correctness. You can refer to my code for more details.
Who can hack it or analyze its correctness? Thank you.
how did you find Weighted Maximum Independent Set for a given graph ?
Just find the weighted maximum clique. And I used hill climbing to find it.
Hope to solve ABCDE, and one of F and G!
And, GL&HF(Good Luck and Have Fun)!
Do you notice the problems can be read NOW???
UPD: i'm idiot, didn't notice the statements are not in this contest.
有中国人吗?
Is there Chinese?
Anyone who answered this question got -15, but 我是中国人。
Yes, but please f**king communicate in English(how many times I've said this before).
swap D and E plz
+1
Problem F is similar to a variation of Dijkstra (computing edges on at least one shortest path), for which I recently created a practice problem
I have also added hints for F on CF Step
D is created only to give pain and trauma :skull:
It was a great educational problem imo as I struggled for quite some time before landing on a fairly elegant solution. It seemed like a mess at first, but ended up being solvable by repeating a function 8 times which I liked.
Hi, I am new to Atcoder is it normal difficulty of a D problem in ABC? And after how much time does editorial comes out?
It is one of the most difficult D's I've ever seen. IMO, E and F were both miles easier than D today. Editorial takes a couple hours to a day to come out but there's usually a video editorial by evima for first 6 or all problems.
Evima editorial
I saw geometry and skipped it. Lol, Ended up solving both E and F.
Could someone please explain the approach behind problem E to me? I tried using a queue to simulate all possible moves keeping track of available cards but it doesn't seem to be working
It's a standard dp on masks problem (The mask should store the removed cards)
Ohh!! I did use a mask to store which cards were used, but I used a queue instead of dp!! I guess replacing my queue operations with dp states will solve my problem. Thanks!!
We can discover that when the same card was removed, then the current player's possible move is same.
So we can just use a binary number to describe the set of cards that was removed and use another variable to store THE CURRENT PLAYER.
D without cancer casework how?
This is my solution,there is some casework but not much.
Probably there are simpler solutions, but to minimize the casework I implemented a function f(c, d) that computes the solution for rectangles with the origin (0, 0) as the bottom left corner and (c, d) as top right. Since the pattern is 4-periodic in both x and y shifting the rectangle by multiples of 4 does not change the answer. So I just shift everything to the top right quadrant (i.e. I make all coordinates a, b, c, d positive by adding multiples of 4) and then compute the solution using inclusion-exclusion as f(c, d) — f(a, d) — f(c, b) + f(a, b).
You can check my video editorials of D, E, and F here
Solved both C and F using segment Trees. All I see is segment trees now :<
Missed F by 2 min because D took all my time.
CAN SOMEONE TELL WHY IS THIS WRONG FOR E , IM FRUSTATED
include<bits/stdc++.h>
using namespace std;
define int long long int
define endl '\n'
void solve(){ int a,b,c,d; cin>>a>>b>>c>>d; double arr[2][4]; arr[1][0]=0.5; arr[1][1]=1; arr[1][2]=0.5; arr[1][3]=0; arr[0][0]=1; arr[0][1]=0.5;arr[0][2]=0; arr[0][3]=0.5;
double ans=0; // cout<<(c-a)<<endl; // cout<<(c-a)/4<<endl; int x=(c-a)/4; int y=(d-b)/2; ans+=x*y*4; // cout<<ans<<endl; int xd=((c-a)%4+4)%4; int yd=((d-b)%2+2)%2; int stx=(4+a%4)%4; int sty=(2+b%2)%2; //portion 1 double pos1=0; for(int i=stx;i<stx+xd;i++){ pos1+=(arr[0][i%4]+arr[1][i%4]); } pos1*=y; //portion 2 double pos2=0; for(int i=sty;i<sty+yd;i++){ pos2+=(arr[i%2][0]+arr[i%2][1]+arr[i%2][2]+arr[i%2][3]); } pos2*=x; //portion 3 // cout<<stx<<" "<<sty<<" "<<xd<<" "<<yd<<endl; double pos3=0; for(int i=sty;i<sty+yd;i++){ for(int j=stx;j<stx+xd;j++){ pos3+=arr[i%2][j%4]; } } // cout<<ans<<" "<<pos1<<" "<<pos2<<" "<<pos3<<endl; cout<<(int)(2*(ans+pos1+pos2+pos3))<<endl;}
int32_t main() { ios_base::sync_with_stdio(0); cin.tie(0);cout.tie(0);
}
I can't read your code easily. Please write it in markdown.
here
What the things! You said this is problem E but this is problem D.
Upd:Stupid me! I've realized that it's not the issue in AtCoder. But I can still check your code.
what issue ? is my solution correct ?
Ok, I've found the approximiate wrong.
The probelm is that the basic rectangle(which is
arr) can be shifted.This is the first time I've paticipated in AtCoder contest. Could someone please say, what is the approximate difficulty of the contest by cf standards?
i've only tried a, b, c and e i guess it would be
a-800
b-800
c-1300 or something like that
e-1600 or something like that
No, that's not what I meant. Is it like div2, div3, div1 + div2, etc.?
ABCs seem to be most similar to div3 I'd say.
I wouldn't agree with that. Normally I can solve all div3 problems without any special effort. As for AtCoder ABC, I can only solve 6 (out of 7) problems normally. And in approximately 50% of rounds I have no idea on how to solve G even after some time spent on it.
But if not div3 then what, div2? And since div3 last position problems are typically rated 2000-2300 from what I gather (and last div4 also had its last problem be of similar difficulty), they would match pretty well with the ABC difficulty curve you mention: most participants below CF yellow will reach but often not solve the hardest problem. :)
It's something between div2 and div3, but closer to div2 in my understanding, yes. Doesn't matter really, just wanted to show that to some people (like me) it seems more like div2 round, rather than div3.
thanks
you can say kinda div 2.5.
problem a and b are usually div. 4 a and b problem c is usually close to d2. C or d2. B d is like d2. c or d2. d and others followed.
ok, thanks
What is the idea behind G once the connection graph is built?
I suspect finding the largest antichain is somehow solved by decomposing into chains as per Dilworth's theorem through some max-flow/min-cut...
I spent soooooo much time on D!!!!!!!!!!! NOOOOOOOOOOO!!!!!!!!!! By the way, I think E is more difficult than F.So how do you guys solve E??
DP bitset
upd: E not use bitset, it can also AC. I can understand why so many people AC E now.
It is more stranger that the people solve E are 2223, D are 2092. D、F are quite a lot easy compare with E. D is quite easy by the way, but only 2092 people solve it. I doubt if some of them using chatgpt by solving proble E. I get AC of problem E using code generated by chatgpt 4o.
Oh! I've ranked 28! I'm so happy!
This time I solved problem F much faster than usual(maybe 15 minutes), because I have met a similar one, https://mirror.codeforces.com/contest/650/problem/D , during my virtual participation.
This makes me believe again that hard work will pay off sooner or later.
Can someone kindly breakdown G's solution for me?
My post contest discussion stream
Also, can someone hack my solution for G?
Gentle ping maroonrk because of this
I think problem D is not very good and I only solved ABCEF.
why Re
https://mirror.codeforces.com/blog/entry/70237
F is similar to https://www.spoj.com/problems/SUPPER/
Even the example is the same.
how to solve bonus problem mentioned in F?
SummerSky mentioned the idea in his comment
There are 2 methods.
upd: E not use bitset, it can also AC. I can understand why so many people AC E now.
So many people solve E in the competition. I doubt if some of them using chatgpt. I get AC of problem E using code generated by chatgpt 4o. The code is as follows.
I think F needn't to use Segment Tree, Fenwick is okay. It only needs prefix maxminum.
Can anyone please help me with E problem This is my submission I am not able to understand my mistake https://atcoder.jp/contests/abc354/submissions/55748268
Thank you