### chokudai's blog

By chokudai, history, 19 months ago,

We will hold AtCoder Beginner Contest 184.

The point values will be 100-200-300-400-500-600.

We are looking forward to your participation!

• +65

 » 19 months ago, # |   +10 Solving D is the main target!!!!
 » 19 months ago, # |   0 good luck
 » 19 months ago, # | ← Rev. 2 →   +4 Hope I can get at least 4 problems！
•  » » 19 months ago, # ^ |   0 you will~
 » 19 months ago, # |   0 Good luck!I hope I can solve E.(I'm too vegetable.)
 » 19 months ago, # | ← Rev. 2 →   -32 ..
•  » » 19 months ago, # ^ |   -26 same with me
 » 19 months ago, # | ← Rev. 2 →   -19 In problem C, the third move in example 3 from (-247,253) to the destination point does not satisfy any of the three conditions! Does the problem setter have any explanation?
•  » » 19 months ago, # ^ |   +2 -247-253=998244353-998244853
•  » » » 19 months ago, # ^ |   0 Wow, I overlooked the difference between the two large numbers. Thanks for the explanation.
 » 19 months ago, # |   0 so tough :(
 » 19 months ago, # |   -14 this is my first time, I am getting AC for the given inputs, but when I submit it gives WA — wtf.
 » 19 months ago, # |   +37 C is not good for Problem C in ABC and I don't like it :(But other problems are great and interesting.
•  » » 19 months ago, # ^ | ← Rev. 2 →   0 sorry
•  » » » 19 months ago, # ^ |   +33 I think the definition of everything is quite clear. Which part do you think is confusing?
•  » » » » 19 months ago, # ^ |   0 What is '.' doing in D?
•  » » » » » 19 months ago, # ^ |   +29 Where do you see that in problem D?
•  » » » » » » 19 months ago, # ^ |   0 Sorry, I meant 'E'
•  » » » » » » » 19 months ago, # ^ |   +32 It is just a character. A character a i , j describes the square at the i -th row from the top and j -th column from the left. Here, a i , j is one of the following: S , G , . , # , a, ..., and z.
 » 19 months ago, # |   0 Problem C isn't a ABC style
•  » » 19 months ago, # ^ |   +12 maybe new style :)
 » 19 months ago, # |   0 how to sove expected value questions
•  » » 19 months ago, # ^ |   0
•  » » 19 months ago, # ^ |   0 It is the sum of possible outcomes each multiplicated by the propability of that outcome.
 » 19 months ago, # |   0 Why the answer to the last example in problem D is 91.83..?
•  » » 19 months ago, # ^ |   0 I'm wondering for it too...
 » 19 months ago, # |   0 Time limit for problem E(in Java) is a bit too strict.I have applied the fastest IO method with silly optimizations still it misses out on 4 cases.
•  » » 19 months ago, # ^ |   +43 Or your solution's time complexity is too high XD
•  » » 19 months ago, # ^ |   0 I submitted in JAVA too and got accepted in 1491 ms, so definitely time limits aren't strict (3 seconds).
 » 19 months ago, # |   0
•  » » 19 months ago, # ^ |   0 F
 » 19 months ago, # |   +43 Aren't E and F classical problems?
•  » » 19 months ago, # ^ |   0 E looks like BFS problem
•  » » 19 months ago, # ^ |   0 how to solve f any hints ?
•  » » » 19 months ago, # ^ |   0 Try meet in the middle
•  » » 19 months ago, # ^ |   +24 I'd like to second that. E and F are way too standard problems if you have appreciable experience.
•  » » » 19 months ago, # ^ |   0 Well, that is abc contest. The maintainers do not write editorials because the problems are so standard that its not worth it. You could also argue that A is to simple.Nobody said the problems in the abc contest were particularly original, why complain about it?
•  » » » » 19 months ago, # ^ |   0 I'm sorry if i was not clear before. I meant way too standard for ABC's standard.
•  » » » » » 19 months ago, # ^ | ← Rev. 3 →   0 F is googlable.
 » 19 months ago, # |   0 How to get rid of TLE in E(in Java)??I have used fastest IO still it failsMy submisssion:-https://atcoder.jp/contests/abc184/submissions/18340875
•  » » 19 months ago, # ^ | ← Rev. 2 →   0 if you have already seen a char then no need to visit it again
•  » » 19 months ago, # ^ |   0 You also need to mark which alphabets you have visited else complexity will be O(n ^ 4). Consider a matrix consisting of all a.
•  » » 19 months ago, # ^ |   +8 Don't apply BFS again on visited characters. For example you have encountered 'a' once, then don't again visit cells containing 'a'.
•  » » 19 months ago, # ^ |   0 You need to optimize your code, not IO.
•  » » 19 months ago, # ^ |   0
 » 19 months ago, # |   +13 Looks like I finally need to learn expected value
 » 19 months ago, # |   0 How do you solve D ?
•  » » 19 months ago, # ^ |   +4 We can create a dp[a][b][c]==prob that that state happens. Then add up the propabilities.
•  » » » 19 months ago, # ^ |   -13 Then add up the propabilitiesI think we need to add "probability multiplied by number of steps to reach a,b,c". Whenever you are helping someone , elaborate completely or don't do at all. Many a times it just confuses people more.
•  » » » » 19 months ago, # ^ |   -7 Fuck you, idiot.
•  » » » » » 19 months ago, # ^ |   0 Sure . I am not bad-mouth as you are. But then how am i wrong ? You have written "propabilities" , what the heck is "propabilities" ? Also if "Then add up the propabilities" was true then wouldn't be answer of every input be 1. Question is asking expectation and not sum of probabilities .People who have downvoted , please downvote , but again these are people who confuse beginners more in name of helping . I was once beginner and i understand that.spookywooky you keep complaining about contest problems and editorials whereas you yourself cannot explain properly .
•  » » » » » » 19 months ago, # ^ |   +3 I love spookywooky's explanations , they're not deliberately explicit enough to become spoonfeeding which is great if you still don't want to miss out on the satisfaction you get after solving the problem yourself and this doesn't mean someone doesn't know how to get the point across. Again it's a personal opinion. Also I don't know many users here who document there thoughts in their contest submissions like spookywooky does which helps a lot sometimes.
 » 19 months ago, # |   -10 That was again nice beginner contest. C was a bit clumsy to implement.
•  » » 19 months ago, # ^ |   0 how to solve C?
•  » » » 19 months ago, # ^ | ← Rev. 7 →   +5 ObservationThe answer is [0,3] What to do with thisif same pts then answer is 0if same diagonal or belong to same square(third way of movement), answer is 1if abs(r2 — r1) + abs(c2-c1) <= 6 (two moves of third type), or imagine this to be chess coloring and both blocks are of same color, or after one diagonal move reaching same row if the distance now is <= 3,then the answer is 2else answer is 3
•  » » » » 19 months ago, # ^ |   0 proof/intuition for 3rd point?
•  » » » » » 19 months ago, # ^ |   +4 Chess coloring.. each block with same color is reachable by 2 diagonal moves (i suggest you to draw out the same)
•  » » » » » » 19 months ago, # ^ |   0 I see. thanks!
•  » » » » 19 months ago, # ^ |   0 Can you link your submission. It would be helpful.
•  » » » » 19 months ago, # ^ |   0 Your solution is wrong in after_contest case.
•  » » » » 19 months ago, # ^ | ← Rev. 3 →   +4 You missed out on that you can reach a point in two moves if abs(a-c)+abs(b-d)<=6 as you can perform the third operation twice.
•  » » » 19 months ago, # ^ |   0 I did some research on this problem. I will try to explain what I understood. Here is my code. Ok. step 0: When source and detination are samestep 1: It will require 1 step to reach destination when it satisfies the 3 given condiitons.step 2: when-AA(it will take 1 step because it seems like it lies on the same diagonal)-AB(it is the case when 2 diagonals meet. so (a+b)%2==(c+d)%2. Correct me if its wrong)-AC(when 1st and 3rd conditions satisfy. Then check for(abs((a+b)-(c+d))<=3))-BB(it will take 1 step because it seems like it lies on the same diagonal)-BC(when 1st and 3rd conditions satisfy. Then check for(abs((a-b)-(c-d))<=3))-CC(when 3rd condition satisfy 2 times so instead of checking for 3 check for 6(abs(a-c)+abs(b-d))<=6)step 3: other than 0,1,2 it is said to be 3
•  » » » » 19 months ago, # ^ |   0 When 1st and 3rd conditions satisfy why should we check for abs((a+b)-(c+d))<=3 wouldn't it be always zero. Could you please explain
•  » » » » » 19 months ago, # ^ | ← Rev. 2 →   0 yeah.. what It mean is it require 1 step to travel along the diagonal and 3rd condition is for checking if it lies with in squares. so A+C.
•  » » » » » » 19 months ago, # ^ |   0 Could you please tell the intuition behind checking the condition abs((a+b)-(c+d))<=3 if 1st and 3rd conditions satisfy. Thanks in advance.
•  » » » » » » » 19 months ago, # ^ |   0 ok what i understood that I will exlpain. Its all my imagination. See in this 3rd condition abs(a-c)+abs(b-d)<=3. I felt like abs(a-c) is for rows and abs(b-d) is for columns. see c+d is the diagonal for destination point. so if the difference between these 2 diagonals are less than or equal to 3 then it means it lies within the squares of the destination only right!!. Even the logic is same for BC also. Hope you understood.
•  » » » » » » » » 19 months ago, # ^ |   0 Yeah, thanks for your time.
 » 19 months ago, # |   +24 Lol C was more hard than E to me.
 » 19 months ago, # |   0 For F, how to know backtracking + meet in the middle has good enough time complexity?
•  » » 19 months ago, # ^ |   +7 We can create the table of size 2^20 for first 20 items. Then do the same for the other 20 items, and combine each entry of the first table with the optimal one from the other in O(logn). ie binary search for the value.
•  » » » 19 months ago, # ^ |   0 Thats exactly what I did but still got WA on 8 cases. Can you help me debug? F//Think simple yet elegant. #include using namespace std; #define fast ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); #define ll long long #define all(v) v.begin(),v.end() #define ff first #define ss second #define pb push_back #define mp make_pair #define pi pair #define REP(i,n) for(int i=0;i> n >> t; vector a(n); vector v; ll sum=0; for(i=0;i> a[i]; if(a[i]<=t) v.push_back(a[i]); } ll i1 = v.size()/2; ll i2 = v.size()-i1; vector v1,v2; for(mask=0;mask<(1<(t-(v2[ind]+v1[i]))){ mn=t-(v2[ind]+v1[i]); } } } ll ans1=t-mn; cout<
•  » » » » 19 months ago, # ^ |   0 Not sure. However, I think v1 and v2 should contain the value 0, too.
•  » » » » 19 months ago, # ^ |   0 I think maybe you should use upper_bound?
•  » » » » 19 months ago, # ^ | ← Rev. 2 →   0 sum+=a[j]; should be sum+=v[j];
•  » » » » » 19 months ago, # ^ |   0 That worked, dumb bug thanks.
•  » » 19 months ago, # ^ |   +3 The constraint on N is small, i.e, 40. So if we divide it in 20 and 20 and then compute subset sums for the right half and left half using recursion, it will have a time complexity of 2^20, which is doable.
 » 19 months ago, # |   +4 How to solve C and D?
•  » » 19 months ago, # ^ |   +7 C: Observe that all fields are reachable with 3 moves. This is, because all fields (chess coloring) with same color are reachable with two moves.So, check if dist==0. Then check if dist==1 by implementing the rules as given in statement.Then check if dist==2, that is same field color or manhattan dist<=6. Or if destination point+3 fields is on one of the diagonals.Else dist==3
•  » » » 19 months ago, # ^ |   0 I was still wondering at the end of the contest why it is not reachable in two moves, yeah it is because of chess coloring :/
•  » » » 19 months ago, # ^ | ← Rev. 2 →   0 How chess coloring is happening in the board ? There can be adjacent cells with same color ? Please explain what you really mean .And what is "dist" here ? You should define "dist" first.
•  » » » » 19 months ago, # ^ | ← Rev. 3 →   +1 chess coloring is that cells sharing a border have different colors, like you know it from chess board.dist is short for distance, the result we are searching for. sorry for that ;)
•  » » » » » 19 months ago, # ^ |   0 You are more confusing now . chess coloring is that cell sharing a border have different colors How does that answer my question : How chess coloring is happening in the board ? dist is short for distance, the result we are searching for But according to your explanation its number of moves.
•  » » » » » » 19 months ago, # ^ |   0 Just dont start to cry, I would feel bad about it.
•  » » » » » » » 19 months ago, # ^ | ← Rev. 6 →   0 It was genuine doubt tbh . Don't know why you are replying in weird way.
•  » » » 19 months ago, # ^ | ← Rev. 3 →   0 Nice idea in problem C. Can you explain me, why you use abs(a-c)+abs(b-d)<=6
•  » » » » 19 months ago, # ^ |   0 Well, its two steps. In one step we can go manhattan distance 3, so in two steps manhattan distance 6.
 » 19 months ago, # |   0 Why is F always wrong??I can't find something wrong in my code.
 » 19 months ago, # |   0 How to solve D??
•  » » 19 months ago, # ^ | ← Rev. 3 →   +1 Dynamic Programming My submission should be self-explanatory Submission
•  » » 19 months ago, # ^ | ← Rev. 5 →   +3 I thought about the reverse process, let's build state a, b, c from all possible final states. That way I can add 1 directly while computing expectation from successive states, probabilities of transition remain the same, but the expected value of answer is now expected value of states a, b, c. Transitions are namely (a+1,b,c), (a, b+1,c) and (a, b, c+1) multiplied with respected probabilities ,of course if its a valid state. Submission Link
 » 19 months ago, # |   0 I think there is a mistake in problem E... I wrote a simple BFS that should never visit a node more than once (and never try to visit a node more than 5 times due to teleport — using the fact that the closest 'a' character to the start should be the one that uses all of the potential 'a' teleports); so my algorithm should be O(m) where m is the number of edges in the graph, but it does not work because of TLE.I wrote my code in C++
•  » » 19 months ago, # ^ |   0 Here is my submission if anyone can take a look: https://atcoder.jp/contests/abc184/submissions/18338763
•  » » » 19 months ago, # ^ |   +5 That heavy usage of sets instead of vector/array seems to make it like 5 to 10 times slower.
•  » » » » 19 months ago, # ^ |   0 Yeah I agree, but it shouldn't have to make a big difference since my complexity and approach were correct.
•  » » 19 months ago, # ^ |   0 Same happened to me too, please check chokudai or someone from atCoder, https://atcoder.jp/contests/abc184/submissions/18341369 , https://atcoder.jp/contests/abc184/submissions/18344137,
 » 19 months ago, # |   +1 this is what happens when people complain about easy tasks in Beginner Contests.
 » 19 months ago, # |   0 How many of you missed C with WA on only a single test case? XD
 » 19 months ago, # |   0 D was the most toughest for me...could anyone share approach?
•  » » 19 months ago, # ^ |   +3 Got AC on my DP Solution -> ? Want me to share my code?
•  » » 19 months ago, # ^ |   0 https://sapphireengine.com/@/2ptnop :) My DP solution
•  » » 19 months ago, # ^ |   +1 I had some difficulties to understand this, too.Then I had to use long double instead of double to get rid of rounding errors. Is that intentional, or is my implementation stupid?https://atcoder.jp/contests/abc184/submissions/18330299
•  » » » 19 months ago, # ^ |   0 Double is sufficient. You got AC because you fixed issue in line 67, 68 and 79.Accepted Code
 » 19 months ago, # |   0 Only solved A, B! :')
 » 19 months ago, # |   0 My C solution passed all test cases except one. Anyone has any ideas on what it would be?
 » 19 months ago, # | ← Rev. 3 →   0 I m not able figure out why my code is giving WA for 2 testcases in problem C. Can someone tell me... Link to My Submission..
 » 19 months ago, # |   -15 I think ABCs aren't good anymore :(
•  » » 19 months ago, # ^ |   0 I think you ain't working hard anymore :(
•  » » » 19 months ago, # ^ | ← Rev. 2 →   +10 Ok I solved up to E. I didn't solve F because I don't know meet in the middle. This contest was just about knowing or don't knowing algorithm. If you know you will solve, If you don't know so you can't solve. A and B were as always. C wasn't good at all as others say. D was just about knowing expected value. E wasn't anything more than one BFS. F was meet in the middle.For all of those if you know the technique you can solve else you can't. Is this contest good?
 » 19 months ago, # |   0 For problem E: using teleporters as edges got me TLE submission but when I added a simple check if the current teleporter letter was used before it passed submission. Can someone explain why is this happening, because I thought since the distance should be less it will not add it to the queue anyway. Is it just the loop that's causing me a TLE?
•  » » 19 months ago, # ^ |   +1 No, the idea of keeping a visited array is a must to avoid tle, because lets say you are traversing the point with 'a' then if this is the first 'a' you have encountered then all other 'a' will be marked with their best distance (thats how bfs works) and hence when you next encounter a 'a', you dont need to again update the weights of other 'a' because they are already marked to their best.
 » 19 months ago, # |   0 Can someone explain solution for C.
•  » » 19 months ago, # ^ | ← Rev. 2 →   0 First check if you can reach the square in just 1 move by using all the conditions specified in the question. Next, see if (a+b)%2==(c+d)%2. If yes, you can reach c, d in 2 moves (if 1 move was possible you'd have already returned). Next, iterate on all the squares that can be reached in 1 move (I used 2 nested for loops, each going from [-3, 3]) and use the same condition you used to check if (c, d) is reachable in 1 move. If it is, print 2, as you spent 1 move in shifting around, else print 3.
•  » » » 17 months ago, # ^ |   0 Bluescorp, your approach was the only one I understood. I got it. Ty !!!
 » 19 months ago, # |   0 Can anyone please tell me why a simple BFS in E is giving me TLE in 3 cases. I am unable to think of any edge cases in my implementation. My Solution.
•  » » 19 months ago, # ^ |   0 imagine a grid with full of 'a', this code would have the complexity of n^2 * m ^ 2 then
•  » » » 19 months ago, # ^ |   0 Thanks, got AC now. I had implemented that initially but commented it later.. :facepalm:
•  » » 19 months ago, # ^ | ← Rev. 3 →   +6 My first submission also got time limit exceeded so I applied this logic , look once visiting a particular character 'a' in minimum number of moves say 'd' then mark all the unvisited positions that has character 'a' as minimum distance = d+1. Now notice that this character 'a'(assumed here) is no longer use so u can erase it from your adjacency list. Mine such approach passed all test cases. Hope it helps and provide u the sufficient idea. My Solution Link
 » 19 months ago, # |   0 Can someone explain D like I am an idiot please. Thanks.
•  » » 19 months ago, # ^ |   0 https://sapphireengine.com/@/2ptnop You can refer this to understand
•  » » 19 months ago, # ^ | ← Rev. 3 →   +13 Let $p[i][j][k]$ be the probability that we currently have $i$ gold coins, $j$ silver coins, and $k$ bronze coins. Initially, $p[a][b][c] = 1$ and otherwise $p[i][j][k] = 0$. We update $p[i+1][j][k] += \frac{i}{i+j+k}\cdot p[i][j][k],$ $p[i][j+1][k] += \frac{j}{i+j+k}\cdot p[i][j][k],$ $p[i][j][k+1] += \frac{k}{i+j+k}\cdot p[i][j][k].$For every such $p[i][j][k]$ where exactly one of $i, j, k$ is equal to 100, we simply update our answer by $((i+j+k) - (a+b+c))\cdot p[i][j][k],$where $(i+j+k)-(a+b+c)$ represents the number of turns needed to reach state $(i, j, k)$.
•  » » » 19 months ago, # ^ | ← Rev. 2 →   +4 I think your solution is wrong, I think the probability at i,j,k would be $p[i][j][k]= \frac{i-1}{i+j+k-1} * p[i-1][j][k] + \frac{j-1}{i+j+k-1} * p[i][j-1][k] + \frac{k-1}{i+j+k-1} * p[i][j][k-1]$Am I missing something???
•  » » » » 19 months ago, # ^ |   0 You're right, I meant to write $+=$ instead of an $=$ for each equation. As we go through the dp the updates will accumulate into the equation you wrote.
•  » » » » » 19 months ago, # ^ | ← Rev. 2 →   0 Does this definition work for second example in the given for the question? I don't think it does, I raised the concern regarding this during contest but they said everything is correct... that's I was trying to think some other solution during the contest.Edit: It works, I was making to some horrible mistakes while calculation
•  » » » » » » 19 months ago, # ^ | ← Rev. 2 →   0 I don't see why not.https://atcoder.jp/contests/abc184/submissions/18354165
•  » » » » » » » 19 months ago, # ^ |   0 Thanks for your code, I found the issue with my way of writing the equation
•  » » » 19 months ago, # ^ |   0 Thank you so much, I tried a similar thing but failed so I was really confused. Thanks for the clear explanation
 » 19 months ago, # |   0 where are the solutions？
 » 19 months ago, # | ← Rev. 4 →   0 [Problem E] This is the first time I successfully hardcoded a solution on AtCoder during the contest. I thought the test cases on AtCoder are invincible too.I guessed random_32.txt to consist of all dots except the start and goal and hardcoded for that accordingly.Before hardcode - https://atcoder.jp/contests/abc184/submissions/18340539 (I still do not know why this TLE)After hardcode - https://atcoder.jp/contests/abc184/submissions/18341941 (This should break and TLE if I add a hex anywhere)Readable version of the code - https://atcoder.jp/contests/abc184/submissions/18346808
 » 19 months ago, # |   0 Give me one corner case for this solution of problem C.
 » 19 months ago, # |   0 Can anyone please tell their approach for problem F. Using knapsack approach gives TLE
•  » » 19 months ago, # ^ |   +11 Try to think about meet in middle, calculate all possible sum of weights of 2 equal parts of the input array and think of obtaining answer as combination of each value from first set with best value from the other. Ofcourse best answer might just come from one part only, so take care of that separately. Time Complexity will be O(2^(N/2)) with 2 pointers or with a factor of N if you're lazy enough :p
•  » » » 19 months ago, # ^ | ← Rev. 2 →   0 Just curious would this approach be intuitive if we don't know about meet in the middle algorithm xD Thanks for your approach by the way.
•  » » » » 19 months ago, # ^ |   0 Well its intuitive now isn't it? :p
•  » » » » » 19 months ago, # ^ |   0 Yes thanks buddy
•  » » » 19 months ago, # ^ | ← Rev. 2 →   0 Yeah. But two pointer will work only if I generate the sum in sorted order. Can you tell how to generate subset sum in $sorted$ order.Edit: — Also how factor of N will not come? I have to go through the n/2 bits position right? so complexity will be $O(N2^{N/2})$. If I am wrong please point it out.
•  » » » » 19 months ago, # ^ |   0 Oops missed the sorting part, yeah its N * 2^(N/2).I meant factor of N over 2^(N/2) making it resulting complexity.
 » 19 months ago, # |   +27 C was tougher than F for me
 » 19 months ago, # |   0 Well it looked like problem setters forgot to check availability of solutions on internet.The F problem was the most basic example of Meet-In-The-Middle algorithm whose entire code is available hereP.S. — I figured this out after contest. Thus, getting 1 WA on my greedy submission.(LoL)Other problems were cool. Thanks for such an amazing problem-set.
 » 19 months ago, # |   +3 My video editorial. Uploading took a long time.
•  » » 19 months ago, # ^ |   0 Was looking for it. Thanks!
 » 19 months ago, # | ← Rev. 2 →   +3 https://atcoder.jp/contests/abc184/submissions/18351753 please someone suggest me a way to get over TLE will be great help! problem E! c++ code
•  » » 19 months ago, # ^ |   0 // tele[c].clear();The above line is correct, uncomment it, and place it after the loop. Each portal letter need to be traversed only once.Otherwise consider N=2000 grid and all cells marked with 'a', it will result in O(n^4) runtime.
•  » » » 19 months ago, # ^ |   0 thanks alot dude!
•  » » 19 months ago, # ^ |   +5 My first submission also got time limit exceeded so I applied this logic , look once visiting a particular character 'a' in minimum number of moves say 'd' then mark all the unvisited positions that has character 'a' as minimum distance = d+1. Now notice that this character 'a'(assumed here) is no longer use so u can erase it from your adjacency list. Mine such approach passed all test cases. Hope it helps and provide u the sufficient idea.My Solution Link
 » 19 months ago, # |   0 why we don't get editorial after the contest what if some one not able to solve the problem where should we discuss.
•  » » 19 months ago, # ^ |   +2 Here
•  » » » 19 months ago, # ^ |   0 no dude i mean atcoder contest problem
 » 19 months ago, # |   0 Pre-req for solving E and F ??
•  » » 19 months ago, # ^ |   0 E- I used dijkstra F — Meet in Middle
 » 19 months ago, # |   0 Can anyone can notice me what is wrong point in my code of Eplease help me. its python and i think i understand idea of this problemhttps://atcoder.jp/contests/abc184/submissions/18354503
•  » » 19 months ago, # ^ |   0 i found it
 » 19 months ago, # |   0 can anyone pls tell me why my code for problem E is getting RUNTIME ERROR? here is my submission
 » 19 months ago, # |   +7 [Problem C] It seems that they added a test case of something like this, that made my wrong code fail after the contest 0 0 0 5 
•  » » 19 months ago, # ^ |   0 Yes，you are right，Thanks a lot！
 » 19 months ago, # |   0 in problem C I am getting 3 WA. I tried but I am unable to find the mistake. The test cases are also not uploaded yet. I am getting WA at random_09.txt,random_10.txt,random_11.txt. Can anyone help me with this
 » 19 months ago, # | ← Rev. 2 →   0 Can anyone please help with my code from problem C. I do not get why it is failing two test cases. Link to submission: https://atcoder.jp/contests/abc184/submissions/18334803
 » 19 months ago, # |   0 Why I m not getting any output?? Submission:https://atcoder.jp/contests/abc184/submissions/18364662
 » 19 months ago, # |   0 Help! I got WA for the Task E and only because one wrong answer of the case "random_23.txt". I have no idea now Submission #18364982
•  » » 19 months ago, # ^ |   0 the_Miracle if (i != tmp) { dist[i.first][i.second] = dist[tmp.first][tmp.second] + 1; vis[i.first][i.second] = 1; Q.push(i); }The above lines are creating errors. Use !vis[tmp.first][tmp.second] to update.
 » 19 months ago, # |   0 Can someone tell me why my code, gives a TLE for the problem E.
•  » » 19 months ago, # ^ |   0 I changed some part of your code , added some visited arrays.
•  » » » 19 months ago, # ^ |   0 Thank you so much..! I understood where I've to make changes to get rid of the TLE.
 » 19 months ago, # |   0 For Problem C: Please give me a condition where need three moves. I can't understand why I can't go to any destination in two moves.
•  » » 19 months ago, # ^ |   0 In the sample input, there is one that require 3 moves 2 3 998244353 998244853 If you want a simpler example 0 0 0 7 
•  » » » 19 months ago, # ^ |   0 Thank you. I got it. ❤
 » 19 months ago, # |   -8 Loda lassan contest bencho problem C to AC hi nahi ho rahi hai.
 » 19 months ago, # | ← Rev. 2 →   +1 F is way too standard and even available on GeekesforGeeks. I understand that ABC are for Educational purpose but I don't think it's a good idea to give problems in ABC that are just a click away from googling.
 » 19 months ago, # |   0 Can anyone tell me when the Editorial will be available?
 » 19 months ago, # |   0 why is there no editorial ? It's been 4 days
 » 19 months ago, # |   0 Is space required in structure binding in C++17? I noted the different behavior on AtCoder between for(auto [x, y]:vii) and for(auto [x,y]: vii). It's so weird. See 2 submissions: 18566943 vs. 18566919.
•  » » 19 months ago, # ^ |   0 you can use text-compare to compare them, only 1 space difference between these 2 submissions.
 » 19 months ago, # | ← Rev. 2 →   0 Hey!, Can someone point out the error in this code for problem C. There is only one test case which is giving WA.
•  » » 19 months ago, # ^ |   0 Ans can be 2 if abs(a - c) + abs(b - d) <= 6.Here is the corrected submission : https://atcoder.jp/contests/abc184/submissions/18786285But your code is very ugly, you can use a for loop instead of writing 15 || sentences.My submission : https://atcoder.jp/contests/abc184/submissions/18786262
•  » » » 19 months ago, # ^ |   0 Thank you. :D
 » 17 months ago, # |   0 can anyone help me, why this operation: m ^ n ^ 1 is same same as: (a + b + c + d) with (m = c — a, n = d — b)