

AtCoder Regular Contest 145 Announcement
source link: http://codeforces.com/blog/entry/105371
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

We will hold AtCoder Regular Contest 145.
The point values will be 400-500-600-700-800-1200.
We are looking forward to your participation!
5 weeks ago, # | As the writer, good luck and enjoy yourself! :D |
-
Can I do up-hack to my AC submission? This submission can be hacked by n=4 AAAA
5 weeks ago, # | What's the approximate rating of ARC's problems B & C according to CodeForces rating distribution? |
5 weeks ago, # | math and counting round |
5 weeks ago, # | I really suck at counting, but today I couldn't figure out what the 16 different permutations were in C, the most I found was 12 :P Can anyone list those out please? |
5 weeks ago, # | Could someone point out what case am I missing in my submission for B? Submission : https://atcoder.jp/contests/arc145/submissions/33632229 |
5 weeks ago, # | My first AtCoder contest. The problems were good, it was interesting for me. Thanks ! |
5 weeks ago, # | As a contestant, I was not a big fan of A,B,D. Those problems' ideas are not hard to get, but have very annoying corner cases... |
5 weeks ago, # | Problem D is magic, but I want to know, why the set , which the differential sequence is is not the optimal one. |
5 weeks ago, # | My friend told me the problem C is in the OEIS, what do you think of it? |
5 weeks ago, # | void jaiishriRam(){ ll n; cin>>n; string s; cin>>s; if(n==2) { if(s=="BA" || s=="AB") { cout<<"NO"<<endl; return; } } if(s[0]=='A' && s[n-1]=='B') { cout<<"NO"<<endl; return; } cout<<"YES"<<endl; } could anyone help me to know what thing I did wrong in A above is the code |
5 weeks ago, # | Can anyone plz tell me whats wrong here in my submission for problem B |
-
Consider the test case :- 6 5 4 ,
Your O/P — 4
Correct O/P — 2
for value (5 and 6 only Alice will win )-
Corrected that mistake but still getting WA on 3 test cases ;-; Here is my submission
-
Consider this test case :- 8 4 3
Your O/P — 6
Correct O/P — 4
Aice wins game (4,5,6 and 8)
Error is in line 58 loop that you are multiplying . They will depend on remainder of (n%a).
-
5 weeks ago, # | Can anyone please tell me whats wrong here in my submission for problem D? |
-
I don't know how your code works, but it fails at the input
4 2
-
It works in such way:
So the dfs is expected to stop in very low depth.
p.s. What about this one? It could pass
4 2
.-
It fails at
10000 0
.The output has these three integers:
-9999991 -9999937 -9999883
-
Sorry, but it got
9999991 -9999991 9999973 -9999973 9999971 ...
here.Maybe there's some Undefined Behavior in my code?
-
-
5 weeks ago, # | C could be solved by writing a brute force and searching the sequence on OEIS. Maybe those problems should be avoided by for example having problems parametrized by some more values, or making sure it isn't easy to find on the internet. It makes the contest experience less fun, if the answer is easily found on the internet. Problems A and B were fine. Problem D also suffered from this issue. |
-
Whoa, i didn't brute force on the actual answer tho, I bruteforced on a subproblem of it, The Catalan Numbers
Why does this code give WA for problem A?
Here lng=long long, rtr=return 0, SZ=2e5+7 |
5 weeks ago, # | This was my first contest on AtCoder, Can someone tell me, when do the editorials be out ? |
5 weeks ago, # | nok0 My submission for A get AC but can be hacked with n=4 AAAA My submission |
In problem A: Why is "AB" a valid palindrome or can be changed to a palindrome according to editorial and tests? |
5 weeks ago, # | for D you can just use brute force to get a set meet the last restriction,and change the largest/smallest number,then add x to all numbers to get sum=M base 3 solution is beautiful but not necessary |
5 weeks ago, # | My solution to B in the contest seems to be wrong. When , the answer is obvious 0, and when , Alice can win when , so the answer is . When , Alice can win when , so between Game to Game , Alice can win games. Consider unexisted Game 0,There are groups of games, and there are ungrouped games, which Alice can win games. Therefore, the answer is But it seems to be wrong and Here's my submission. I also found another AC submission with formula I wonder what makes the answer passed and mine failed. |
5 weeks ago, # | I have different approaches for problem D and E: Ingore the limit of sum for now. Let be the set of integers, one can find that is good. Now consider the limit of sum. One can find that if we change the into , and add to some greatest elements in , it is still good. We can change to () by performing operations in order. Now we change into from right to left, taking the lexicological largest basis each time. It turns out that the number of operations is OK. (It can take up to operations to change a single number, but each operation will move some basis vectors to the right) |
-
Your code on E submitted during contest can be hacked using the data generated by the code below.
#include<bits/stdc++.h> #define rep(i,a,n) for (int i=(a);i<=(n);i++) int main() { int n = 1000; printf("%d\n", n); rep(i, 0, 59) printf("%lld ", 1ll << i); rep(i, 1, n - 60) printf("%lld ", (1ll << 60) - 1); printf("\n"); rep(i, 0, 59) printf("%lld ", 1ll << i); rep(i, 1, n - 60) printf("%lld ", (1ll << 60) - 1 - (i & 1)); return 0; }
My randomized solution for E: If the answer is Yes, we first randomly manipulate the sequence for a small number of times, and then operate on index more than times repeatedly. Then we can (roughly) assume that is a linear combination of , where is about . We can then solve with Gaussian elimination. If , operate on so that . Then we operate on the second minimum element in . Then is removed from and all indices between and are added. Repeat this process until and operate on . Do this for and we are done. This solution uses ~60000 operations in randomly generated inputs. UPD: More than 1000 random operations at first are needed to guarantee randomness. |
5 weeks ago, # | Can somebody explain here problem D, how exactly are we constructing the required set after we have figured out the base 3 condition where each digit should be 0/1. |
5 weeks ago, # | F is some wild generalization of IMO 1995 P6. I like it |
5 weeks ago, # | Such a magical problem D! Base-3 representation is such a trick that could perfectly beat the rule of . Next, by first keeping the rightmost digit of all n integers as zero and then change some of them to 1, so that . At the same time, all n integers are still distinct and satisfy the "good set" rule. Finally, add to each integer so that , and at the same time, adding the same integer will not lead to any , although they may not belong to the "good set" anymore. Thanks to the problem writer for coming up with such a clever and unbelievable construction problem! |
Was only able to solve A, although I misread the problem at first and somehow thought that I could use the operation only when adjacent characters are equal, lead to 3 WAs but we move.... |
5 weeks ago, # | In terms of codeforces ratings, what would be the difficulty rating for problem A? |
5 weeks ago, # | can anyone explain logic of c plz? |
5 weeks ago, # | This round is good, arc should contain magical counting and constructing problems like this. |
A different way to think for D. We can construct as follow (P is a set,initial ): means add to all elements in . And it can prove that for every triple of distinct elements in . (Which is similar to the official editorial) and we can construct the set with elements, and enumerate which two to delete. It can solve the problem. |
-
Could you please talk more about why your construction will not lead to 2y=x+z? And, how to construct these n+2 elements, and how to determine which two to delete?
Thank you so much for providing such a clever idea.
-
Let we can found that .
This is my submission for D.
-
4 weeks ago, # | Sorry for asking it late, Can any one please the explain this line of editorial : Here, if the elements in P are scanned from left to right, there must always be more left elements than right elements. The number of such arrangements corresponds to that of parenthesis sequences. What I understood is that, lets say we have (1,2),(3,4),(5,6),(7,8) as corresponding (ai and bi). Editorial link : Link |
100 minutes ago, # | sorry for asking late. i'm confused about problem C on how/why the legal arrangement corresponds to parenthesis sequences. (that seems strange to me) i know we are arranging some pairs like (1,2)(3,4)... , but in my opinion and based on some experiments and some comments like this. i claim an arrangement is legal if and only if there is no pair contains another pair. for example, (1,2,3,4) legal because pair(1,2) and (3,4) doesn't contains the other. (1,3,2,4) is legal because two pair intersect not contain. (1,3,4,2) not legal because of containing. however, if you see the pair as parentheses, (1,3,4,2) is legal because they can be mapped to "(())". that's a contradiction (do i misunderstand something?) however again, when we consider the number of it, these two somehow are equal. here i take some example on n=3 to illustrate. ![]() you see, if we take the view of parentheses, their correspondence(left parentheses and right parentheses) is really strange (at least differ from matching them greedily) in general, i'm not negate the editorial, but i think i need some more clear intuition to understand this transform |
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK