We will hold GAMEFREAK Programming Contest 2023 (AtCoder Beginner Contest 317).
- Contest URL: https://atcoder.jp/contests/abc317
- Start Time: http://www.timeanddate.com/worldclock/fixedtime.html?iso=20230826T2100&p1=248
- Duration: 100 minutes
- Number of Tasks: 8
- Writer: kyopro_friends, Nyaan, evima
- Tester: yuto1115, MMNMM
- Rated range: ~ 1999
The point values will be 100-200-300-400-425-500-600-650.
We are looking forward to your participation!
Where is ABC316?
I think they forgot it. How interesting.
Maybe this is a sensitive number/date/year for the Japanese. The only thing I know is that there is an earthquake in Japan on 3.16.
Where? Osaka? Kyoto? Tokyo? Nagasaki? Nagoya?
Therefore ABC311 should be also skipped because of the earthquake in 2011.
https://twitter.com/atcoder/status/1683320231299788800
WOW,I do not know anything about it.
It was happened on benshu Island,Japan.
Anyone?
Is it permissible to ask questions during contests? I just ask.
Oh,thank you!
Yes,I think so
Anyone thinks problem D is confusing?
No
quite
oh hell yes I love ABCs when my rating is based on "how fast I can solve ABCDE" but the E is implementation hell (/s)
Same ,i read E and i know i can solve it but i don't want to.
what is mistake in this code for D? Can anyone give a counter test https://atcoder.jp/contests/abc317/submissions/44966049
If I had to guess, I'd say you are overflowing. We have $$$N=100$$$ and each district allows up to $$$1\,999\,999\,999$$$ votes in total. Try using 64-bit integers and see if you still get an error.
I already used long long everywhere
$$$extra$$$ could be negative here, which I believe should not have been the case. Not only is it being negative a problem, you should anyway only be considering the districts where the opponent is winning, to add to yours.
Also (unrelated), as a minor optimization, you could rewrite ceil_div this way:
yes, while taking input at that time only i have considered only where opponent is majority and have pushed that elemnts into vector
Thanks for ceil_div
Crazy F.
us moment :3 my submission
How to solve $$$G$$$? (was able to do $$$A$$$-$$$F$$$) I think it was similar to Sudoku Pattern but couldn't think how to proceed actually.
bipartite matching
Can someone help me with Problem D, I couldn't figure out why it's passing only half of the test cases Edit: Solved!, using long long helped
When you solve $$$F$$$ with $$$10D$$$ DP.
On these submissions for C, 44981045 and 44981274, the only difference is that the graph in the first one is initialized with null values while the graph in the second is initialized with zeroes. Why does the first submission work but not the second?
I figured it out. In the code with the graph initialized to 0 values, impossible permutations get calculated. When the graph is initialized to None values, the impossible permutations get skipped since I don't update to the next node when the next node is impossible to get to.
E is how NPC works in Pokemon. Classic.
UPD: fixed the issue
https://atcoder.jp/contests/abc317/submissions/45000172
sir I am really sorry but I have a life so I cannot debug your 10d dp code , but if you are interested here is mine , I think the code is clean : https://atcoder.jp/contests/abc317/submissions/44997389
Here's my 6D DP solution, in case anyone's interested
https://atcoder.jp/contests/abc317/submissions/45000741
Hey , can you please provide the intuition about the states and logic in detail . I am not getting the idea from ur code.
Hey guys! can anyone help me see what's wrong with this solution for problem E? It's the exact same approach as editorial but I can't see what's wrong here
include
include <bits/stdc++.h>
using namespace std;
bool isdir(char c){
}
bool isvalid(int i, int j, int n, int m){
}
bool isnotgoal(char c){ if(c == 'S' || c == 'G')return false; return true; }
vector x = {-1, 0, 1, 0}; vector y = {0, 1, 0, -1};
int main() {
// cout<<start_i<<" "<<start_j<<" "<<final_i<<" "<<final_j<<" coordinates \n";
// for(int i = 0; i < h; i++){ // for(int j = 0; j < w; j++)cout<<mat[i][j]<<" "; // cout<<"\n"; // }
}
Link to submission
drgrenkenstein your solution will fail on testcases like-
Sv.
..<
G..
Your code output=2, correct = -1. Because you're changing the values of '.' to '#' so after you encounter 'v' in first row you will change the input to :
Sv.
.#<
G#.
and thus '>' will not do anything since it's adjacent value is already '#'.One possible way to do this is to mark those cells visited rather than changing their value to '#'.
Accepted code (modified)- submission
Really appreciate it! I was lost where exactly I am making the mistake? Thanks for the help!!
Anyone overkilled C with bitmask dp or is it only me.
My contest submission
why does the editorial solution for C has a time complexity of
O(n.n!)
, i couldn't really see why?Can someone provide a counter-example for greedy approach for problem D? Here is my code: https://atcoder.jp/contests/abc317/submissions/45121156
Correct answer should be 57.
Thanks a lot.