We will hold AtCoder Beginner Contest 313.
- Contest URL: https://atcoder.jp/contests/abc313
- Start Time: http://www.timeanddate.com/worldclock/fixedtime.html?iso=20230805T2100&p1=248
- Duration: 100 minutes
- Number of Tasks: 8
- Writer: yuto1115, Nyaan, math957963, kyopro_friends, m_99
- Tester: cn449, physics0523
- Rated range: ~ 1999
The point values will be 100-300-400-550-600-625-625-650.
Since this contest is used as a qualification round for a local onsite contest, the problems are a bit different from usual ABCs. The style of the problems is a bit closer to ARCs, and the problems are a bit harder. Please refer to previous contests prepared in a similar manner.
- https://atcoder.jp/contests/abc262
- https://atcoder.jp/contests/abc288
- https://atcoder.jp/contests/abc290
We are looking forward to your participation!
Never seen point values being so odd.
The subject of the contest is very difficult, I think.
Yes. I've been crushed by D. :(
Heard that the game is more difficult than usual, hope I can solve ABC.
The problems are "a bit" harder.
Update: Only solved ABCDE during the contest. It's really difficult!
A BIT easier than ARC...
Let's see if we can solve the first 3 problems.
The first three problems' difficulties today is like the first four problems' difficulties in ordinary ABC's.
The point value is different from before and the difficulty has also increased. Looking forward to it.
I solved problem A. But I can't solve problem B...
The same as you, I thought out the answer of Problem B at last but at that moment the contest has ended... It seems that I am still a newbie.:-(
I use depth first search and graphy theory. My Program can't run correctly on testcase 26, 27, 28, 29. When I see the editoral, I find that the correct code is easy!
Yes. I tried to solve it using the DSU at first, but in fact that proved to be cumbersome and would get WA on nine testcases. I need practise more,lol. Come on, let’s work hard together!
No god please no
I only solved AB
My rating will go down rapidly
So did I.
First 3 felt easier than normal ABC's level and then D killed me.
C: 3720 D: 640 D should be at F!
Why is my code for C wrong?
i used this code for first but i get WA on samples so i changed it and solved this problem with binary search.
You intution is wrong . Think different
G : https://atcoder.jp/contests/abc313/submissions/44302729 O(maxA) pass
Sorry to inform that C == this. btw i got my penalty cuz my sol doesn't have enough array size...
I only solved ABC My rating will go down rapidly
Me too
It's wise of me to participate unrated. Problems are very hard.
It seems problem C can be solved without sort,in O(n).(the official solution is O(n logn) ) By divide the a[i] into two groups.
My Solution:
if a[i]<sum/n , ans1+=floor(sum/n)-a[i]
else ans2+=a[i]-ceil(sum/n)
so the answer is max(ans1,ans2).
I submit it and AC,but I'm not sure if its really true.Can anyone tell me?
Luckily, my solution is the same to you! Here’s my code: https://atcoder.jp/contests/abc313/submissions/44291223 (I submitted during the contest)
Today's difficulty level of the problems I could solve According to me A < B < C < E < D
D was the most thinking I had to do among them, rest were pretty straightforward.
Why is my code for B wrong?
I see the a list doesn't always have the root in each index, so it's the wrong algorithm for this problem.
Is there any way to check a specific test case at Atcoder?
My submission for problem D fails at 1 test case out of the 29 test cases, and I'm not able to pinpoint where the error could be.
happened to me too, i was able to find a counter tho
n = 6, k = 3, a = [1, 0, 1, 1, 0, 1]
Might work for you
Nah, unfortunately, even this tc works for my code.
bro did u use gauss elimination?
i know why i got wa*1 now, cuz this testcase will lead to multiple solutions.
no i didn't
awa
You can find the test cases for all the previous atcoder contest here: https://www.dropbox.com/sh/nx3tnilzqz7df8a/AAAYlTq2tiEHl5hsESw6-yfLa?dl=0
Whats Wrong in this code for B ?
using namespace std;
typedef long long int lli;
void dfs(int V, vector adj[], int node, vector &vis)
{
vis[node]=1;
for(auto itr:adj[node])
{
if(vis[itr]==0)
{
vis[itr]=1;
dfs(V,adj,itr,vis);
}
}
}
int main()
{
int n,m;
cin>>n>>m;
vector adj[n+1];
for(int i=0;i<m;i++)
{
lli a,b;
cin>>a>>b;
adj[a].push_back(b);
}
int cnt=0,store=-1;
vector vis(n+1,0);
for(int i=1;i<=n;i++){
if(vis[i]==0){
cnt++;
store=i;
dfs(n,adj,i,vis);
}
}
if(cnt>=2) cout<<"-1"<<endl;
else
cout<<store<<endl;
return 0;
}
I think problem D is very fantastic. May I ask the atcoder_official team, how do you come up with this problem and idea? Is there any related problem or similar idea that inspires you? I think to create such a problem is even harder than solving it.
Hey, I am only able to solve atmost 2 problems in the contests and I want to increase this number. Someone of higher rank pls guide me. I really tried to go with brute force, dp, backtracking methods but I am not able to solve those 3, 4 ,... questions of the contest. Pls someone share some keypoints which can help me increase my rank in the contests.
I tried doing problem B using map,but I am getting wrong answer in some test cases. Can someone explain me what is wrong here? I think logically it should be correct, since it passed most test cases.
Submission link:https://atcoder.jp/contests/abc313/submissions/44280370
I have passed all the ABCDE questions. Do any talented programmers tell me how to write F questions?
Hot to see the AfterContest?