👋 Salam, Codeforces!
We are thrilled to invite you to the Rayan Programming Contest 2024 - Selection (Codeforces Round 989, Div. 1 + Div. 2).
The Selection Round is a rated contest for Div. 1 + Div. 2, taking place on Nov/30/2024 17:35 (Moscow time). The problems for this round were crafted and prepared by ArshiaDadras, MohammadParsaElahimanesh, AmShZ, AmirrzwM, and Keshi.
The top 60 trusted participants (with a maximum of three from each country) will qualify for the onsite Final Round in Tehran, in Spring 2025. An additional quota is reserved for the host country. Hotel accommodation, local transportation, and meals will be provided to all finalists. More details about the final contest will be available on the Rayan website.
🏆 Selection Round Prizes:
- The top 50 participants will receive T-shirts. 👕
- Additionally, 50 random participants from ranks 51-1000 will also receive T-shirts.
🏅 Final Round Prizes:
- 1st place: $15,000 💵
- 2nd place: $10,000 💵
- 3rd place: $5,000 💵
- 4th–6th places: $2,000 each
- 7th–10th places: $1,000 each
🙏 Special Thanks:
We would like to extend our deepest gratitude to:
- MikeMirzayanov for enabling this event through the amazing Codeforces platform.
- The one and only KAN for his invaluable support in hosting the round.
- Dear TheScrasse for his dedicated coordination efforts and lots of discussions about the problems
and rejecting a big chunk of our problems for Problem C. He also contributed some problems to the contest, one of which was selected by the team! - Our testers who tested and provided invaluable feedback to improve the problems: peti1234 for being our LGM (VIP) tester, wyrqwq for his great ideas
and ignoring his school midterms to test the problems, Error_Yuan for helping usand picking on tough problems for no reason, Hyperbolic, DylanSmith, valeriu, Clan328, powervic08, CepryH9, mispertion20, PineapplesOnPizza, vyshniak.n, ErrorAssassin, nicolasalba, naniim, estoy-re-sebado, mika_uwu, rulerofcakes, AkiLotus, Random_3652, sleepwalking643, Leonardo_Paes, RockSnow, waidenf, and newb_programmer. - Prof. Hamid Zarrabi Zadeh and Prof. Mohammad Ali Abam, whose leadership and organizational efforts make this event a reality. Thanks to their vision, Rayan is becoming one of the largest competitive programming contests in terms of prizes (and soon participants!).
- You for participating and getting positive delta (and maybe the final prize in the next year 💸😉).
📊 Score distribution: $$$500 - 750 - 1500 - 1500 - 2000 - (2000 + 2000) - (3000 + 3000) - 5000$$$
We look forward to seeing you both online and onsite!
Good Luck & Have Fun! 🎉
Note: Editorial just published here! 🚀🍿
Auto comment: topic has been updated by ArshiaDadras (previous revision, new revision, compare).
Is there a separate category for Iranians, or will all participants be grouped together?
All participants are considered together. The only difference is that we have a separate quota (about 30–40) for Iranians, which will not be counted within the main quota.
As a tester, I didn't know I could have won $15,000 (just needed to beat a certain Belarusian...)
Y'all should give it a shot!!! Good luck.
Sorry man, but I have to admit that I'm kinda glad you didn’t know that 🫂
For the 1st time in my life, I found the tester's comment funny!
As an author, please give me T-shirt too.
I predict tourist will fall below 4000.
Edit after round: everyone who downvoted this should apologize to me in DMs.
he already did unfortunately last contest
I predict tourist will become tourist once again.
I predict that tourist will get 3rd this time and won't become tourist :)
yes i think so
I think he will become tourist again.
yeah same i think it too
He lost to orzdevinwang again
I think orzdevinwang will be beyond 4200 in 2025
Nice! This must be one of the rounds of all time, I'm so excited to see my teachers' round ;)
Let me tell u sth about ArshiaDadras:
I officially started competitive programming and programming classes with Arshia Dadras four years ago. He is a very capable and ethical teacher. Thank you, Arshia, for being so great <3
Thank you so much for your kind words and support, AmirParsa!
It’s truly a pleasure to be remembered in such a thoughtful way. I’m also really happy to see that you’re continuing to improve your coding skills.
Wishing you the best of luck in your journey, and I hope we get to meet in person soon!
Thank you, man. It's an honor for me to have grown under the guidance of professors like you. I'm looking forward to meet you in person too ;)
"The top 60 trusted participants (with a maximum of three from each country)"
How will you enforce this?
We will start inviting participants from the top of the list while considering the country limit (a maximum of three participants per country) until we fill all 60 spots. Each invited participant will have a specific time frame to confirm their attendance. If someone declines or cannot attend, their spot will be given to the next eligible participant from the scoreboard who meets the criteria.
Paying people that much to solve problems with already existing solutions..
As a tester, this is the $$$4^{th}$$$ time in a row I found at least one problem in the round I tested really satisfying, and I hope people would feel the same.
I love Persian contests!
Why do you like Persian contests?
Because most of them are about their history, and Persian history is very good.
As a tester I wish good luck to everyone!
As a tester, I can confirm that I tested this round.
As a tester, I liked to test my first round! :)
PS: If you win $15,000, please give me the T-Shirt, hahaha
gpi
Final Round Prizes: 1st place: $15,000 2nd place: $10,000 3rd place: $5,000 4th–6th places: $2,000 each 7th–10th places: $1,000 each
^^^
How much will you win? They're really rich...
(This is my first comment on CodeForces so if you think I'm wrong please politely scold me)
If you look at their website, the onsite part is sponsored by a university and from what I can tell an entire ministry, and these prizes are for the onsite part. This round is only a selection round before the onsite one.
I understand, thank you. By the way, the prize money for the competition held by Huawei last time was also as high as this
as a persian, i can confirm i ain't winning shit
But I guess we'll have someone from Iran in the top 10... P.S. Let’s bet lunch on it!
Kaviani?
as a persian, i also confirm i'm not winning anything
W salam
I'm quite interested that, is there any special about the sponsor? why does this contest appears on the top bar?
could it be to do with the high prizes?
niceeeeeeeeeeeeeeee
tourist will destroy this contest to earn money
With pleasure—he’s more than welcome!
Yeah, i really sure he will at the top and earn $15000
As a participant, I will participate!
BTW, what watch are you wearing, sir ?! ArshiaDadras
Do you arrange this every year?
We’re planning to do that, but this is Rayan’s first year!
We need to evaluate the feedback and reception from participants before making a clearer decision.
Thanks.. It will be great. Can I ask you the meaning of "Rayan"
“Rayan” is derived from the first part of the Persian word “Rayaneh,” which means “computer.”
Fun fact: If someone asks us, “What is the event name?” we would reply, “It’s Rayan.” In Persian, we could say this as “Rayan eh,” which follows the same pattern as saying, “It’s cold” -> “Sard eh” or “It’s good” -> “Khoob eh.” Interestingly, this sounds exactly like the word “Rayaneh”!
hope to reach expert this round. any recommendations?
this round will make tourist get back to gm i guess. lol
Nah he will become reverse nutella again
Fantastic ! nice job Iran. Good luck everyone.
Bcz problems for this year have been leaked and the winners are already decided $$$??$$$
I am new to codeforces but still I try.
As a Participant, I can confirm that I am not a tester.
I'm just looking at the rewards knowing I won't be even close to top 10 :/
Why not? At the very least, you’d get to enjoy a wonderful trip to Iran, stay in one of the best hotels here for free, and experience some amazing hospitality! (if you can make it to the top 60 😁)
Hey Tourist, I accept donations here ಥ_ಥ
Excited for my first contest as a specialist!
if there are $$$50$$$ russians above me and all of them refuse to go to the onsite, will i be invited?
Yes, as I said here! (if you'll be one of the next candidates to invite)
if someone sets their country to Gibraltar will you somehow check that they are indeed from Gibraltar?
I hope we don’t encounter these types of cheaters in the top 60. But don’t worry—we’ll verify their passports during the invitation process to catch any discrepancies.
Sad
As an Iranian, this really makes me proud!
And I would like to thank the medalists who designed the questions and all the people involved and hardworking in this event!
I think it is a good thing that the famous programmers of Codeforces come to our country.
I hope to see the tourist here!
The same day as chinese NOIP! Hoping we all have good performance in the both round!
Good luck to us.
is it for rating
May everyone get their expected rating plus this round<3
GG everyone!!
Is this round rated?? as normal cf contest
participation is enough for registration or i have to register on website or something??
It's like a normal rated contest in CF. Also, participation is enough for registration and you don't need to register on the website or somewhere else.
Great
dond tell me what to do
Time Conflict with ICPC Regionals QAQ
im new to codding but still im going to Participate hopefully i receive a t-shirt
looking forward!
Salaam too.
Hope to cross 1100 again this time!
Hey..I looked at your profile..you have been doing cp for more than 2 years now but still not able to improve much even after being so consistent..with this much pracitce you should have touched pupil by now..Mayb you are doing something wrong.. Try solving cses that helped me..also you can practice usaco guide silver level prblms and learn techniques on prefix/suffix sum,two pointers etc..Also try atcoder contests and gym prblmes..Good luck buddy
Thank you, buddy, for your suggestion. I’ve already solved many problems on CSES and am familiar with concepts like prefix sums, two-pointers, binary search, basic graphs, and recursion. I’ve also participated in a few Atcoder contests but haven’t practiced USACO or GYM problems yet— planning to work on those. Previously, I lacked consistency. So, recently I have been consistent and hopefully, I will reach pupil soon. I will try my best. Again buddy thanks for your suggestion. I am getting more inspiration to reach pupil now.
You're most welcome.. I would suggest to go through the topics of usaco silver level and try to solve the problems of those topics like bs, prefx sum etc. from there first..(some of those problms are really nice but you may need to create accounts on multiple sites :)) Maybe then you can try out the gym problems.. (Also dont spend too much time on a problem if you cant solve it on first try.. Go to the next ones then come back agaim here.. I used to spend too much time on a prblm but thats not worth it but just a waste of time for most of the times) Hope for the best.. See ya
As a tester, I wish everyone good luck! :)
Мы Русские, захватим планету, сша следующие
иди ученика апни прежде чем захватывать кого-то
💩
print("Alex_0000-уважение")
teams or no?
No, buddy!
Rayan Gosling Round
Wish tourist back 4000++ once more.. yo yo
rainboy orz (Problem H).
Seems orzdevinwang will become tourist soon!
...Why does the sentence sounds that strange.
I said D > C;
c>d for sure bro
b>>d
Bro pulls the nazi profil picture
What is the case in E where a solution exists for both k and n being odd and k < n?
in all cases, a solution will exist if n and k are odd except for k=1 and k=(n-1)!
k=3 and n=5 what is the solution?
1 2 3 4 5 3 4 5 1 2 5 3 1 4 2
how do you construct the solution if k=3 and n>k?
First 2 permutation will be 1,2...n and (n+1)/2...n,1..(n-1)/2 . For odd n
ah ok i get the solution i just assumed that if k=3 and n>k it was impossible
nice pics SIR
C was so annoying to solve. Forgot one edge case and spent all my contest time on it, leaving no time for D :(
Actually, C seemed difficult to me not because of solving the problem, but because of the implementation. What edge case did you get stuck on? I can share my solution if you want.
Yes, the implementation was also painful. But I solved it at the last minute :')
How to solve E?
For even k, you can keep any permuation and it's opposite( p'[i]=n+1-p[i]). For odd k, you need to find any 3 permuation with equal sum on all index and then do as the case with even.
Sooo nice E! Though it contains some casework, there is a beautiful construction method.
Can you share it with us common folk?
We treat $$$n=1$$$, $$$k=1$$$, $$$k=n!$$$, $$$k>n!$$$ first.
Let's define $$$i$$$ th permutation as the permutation when we call next_permutation for $$$(1,2,\dots,n)$$$, $$$i-1$$$ times.
First we construct for even $$$k$$$. We can just take $$$i$$$ th permutation $$$p$$$ and $$$(n!)+1-i$$$ th permutation $$$q$$$ together. (actually, $$$p_i = n+1-q_i$$$)
For even $$$n$$$, if $$$k$$$ is odd, the answer is
No
(because $$$k \times \frac{(n+1)n}{2}$$$ isn't divisible by $$$n$$$)Now, we construct, for odd $$$n$$$, $$$k=3$$$. This can be done by this method (as an example, let $$$n=7$$$).
At last, we construct, for general odd $$$k$$$. We ignore following pairs:
At the current state, we can take $$$\frac{n!}{2} - 3$$$ pairs. After that, just add $$$k=3$$$. Then, we can construct for $$$3 \le k \le n!-3$$$.
tysm
wow! That left shift (n-1)/2 is insane, Any inspiration to come up with that?
I saw this problem and immediately coded brute force for $$$n=5$$$ and $$$k=3$$$ and the first one that came out was that construction
It comes by try & error so I can't tell exact step, but I tried to match $$$(1,4,7)$$$ first, suddenly cames up my construction.
Maybe $$$(1,2,3,4,5,6,7)$$$ + (shift) leads the difference of the sum of two permutation $$$+2, +2, \dots, +2, -n+2, +2, \dots, +2$$$ (and under odd $$$n$$$, this works) is the decent way?
I didn't manage to solve E during contest (I was really close, but I missed a few simple cases, like n = 1 and forgot about the cap for evens). I did get something very close. But basically once you realise that you can do all evens up to n! you can come up easily with "maybe if I can figure out a solution for 3 then it will work". And then you realise that you are looking for something that once you add 1 2 3 ... n it makes the same thing, you get the idea that you make something where the sum increases by 1 every time. I still had some trouble, but then I thought it would be easier if I just do every 2.
So for every 2 I could do for 7:
4 5 6 7
1 2 3 4
that would add up to 5 7 9 11
and then the rest complete the sequence. So my own solution for 7 was:
4 1 5 2 6 3 7
1 5 2 6 3 7 4
7 6 5 4 3 2 1
Then it's somewhat obvious that 4 = 7 / 2 + 1. Then it was easily expandable as start for n / 2 + 1 for the first one.
why is this getting downvoted
Because the problem E is neither nice, nor beautiful.
how you rate a problem can be subjective, however, why would you take it out onto someone else who's not involved in setting it?
Nothing could be worse than losing rating on my birthday :(
Edit: problems are nice, I choked on H with some cases like
1 3 105 63 45
and what I missed is just enumerating the GCD of all picked numbers...happy birthday! :)
Happy Birthday!
Happy birthday tho!
Well a gain of 0 is better than any loss I suppose. Happy birthday!
Yeeeees! I’m so happy that codeforces give me this non-negative delta as my birthday gift, and my solution for H works after fixing the bug. Thank you! OvO
My God!
I don't know; maybe as an Iranian I would have preferred not to take these internal disputes to CF and resolve them by ourselves!
Of course, I definitely didn't want a few one-sided people talking about it, and I'm happier that both sides' opinions were presented.
But in the end, the beauty of the previous comments was lost in this kind of discussion and debate....
AT 2:53 OF CONTEST TIME THE DIFFERENCE BETWEEN TOURIST AND ORZDEVINWANG WAS 32 POINTS. TOURIST NEEDED TO HACK SOMEONE AND HE MANAGED TO DO SO 8 SECONDS BEFORE THE END OF THE CONTEST!!!!!! BUT ORZDEVINWANG SOLVED G2 3 MINUTES BEFORE THE END OF THE CONTEST, SECURING THE FIRST PLACE!!!!! WHAT A DRAMA OMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOGMOG
The problems were nice, though I feel like I solved something very similar to F a long time ago on Codeforces (I didn't have time to solve it though, I spent too long on implementing D and E). Also, they have very nice pictures :D Do you think that they are AI generated? They are very intricate but I don't see any obvious AI artifacts. Otherwise, big respect to the artist who made them.
You're welcome!
orz orzdevinwang. Also IF orzdevinwang didn't solve G2, then tourist would have won by doing a successful hacking attempt at the last minute, that's crazy.
Is it true that in H the max size of the answer is 3? And does it have randomized solution?
The max size of the answer is 6. let $$$x=2\cdot3\cdot5\cdot7\cdot11\cdot13$$$, then $$${\frac{x}{2},\frac{x}{3},\frac{x}{5},\frac{x}{7},\frac{x}{11},\frac{x}{13}}$$$ is a valid set
Here is the rough sketch for H.
This is how we can characterize all possible linearly independent sets $$$a$$$.
First find a set of distinct primes $$$p_1,p_2,\ldots,p_k$$$ and let the gcd of all the $$$a$$$ be $$$g$$$. We will write $$$P = \prod p_i$$$ as the product of all the primes here.
Then we can construct a linearly independent set $$$a_1,a_2,\ldots,a_k$$$ where $$$a_i$$$ is a multiple of $$$\frac{gP}{p_i}$$$ but not $$$gP$$$.
For each linearly independent set, you can find a corresponding $$$(g,p_1,p_2,\ldots,p_k)$$$ that satisfy the above constraint.
Then after brute forcing everything, you realize the the number of possible $$$(g,p_1,p_2,\ldots,p_k)$$$ with $$$k \geq 3$$$, $$$g \mid P$$$ and $$$\frac{gP}{\min(p_i)} \leq 10^5$$$ is at most 500k or something. So you brute force everything. I had to use a bunch of constant opts to pass because my code is shit.
Checking answer is at least $$$2$$$ can be done in $$$O(n \log n)$$$.
What's with the constraint of A? I see a lot of people passed it with brute forcing, but they're quite close to the time limit, while I got TLE and I suspect it's because I used
long long
instead ofint
.I don't see why it couldn't be much higher so that no brute force solution could pass, or be much lower so that every brute force solution could pass.
Why are there few pretests on problem D and E? I'm worried that my solution won't pass the system tests.
Nevermind, they all passed the system tests.
Problem C was nice (although very standard dfs problem). D wanted me to kms.
how to solve that?
C or D?
C
I applied DFS here. Firstly, i marked all the non '?' boundary cells bad if they were actually making the pointer out of bound (for example, if
a[0][0] = 'U'
, this is bad cell). Now, I just applied dfs from an unvisited cell. For the question mark, we can replace it with either of the 'L', 'R', 'D', or 'U'. Hence, if any of the four gives me a good answer, I'll take that, otherwise I'll mark that cell as bad. For the explicit cells, likea[i][j] = 'L'
, it will be marked based ondfs(i, j - 1)
.Problem C (my solution)
Start with your answer = n*m. Perform a DFS from each node and find the end state of the BFS from each node (either an infinite cycle, a question mark node, or an escape). If a node leads to an escape, subtract 1 from your answer. For the question marks, check each adjacent grid square. If the destinations of all adjacent squares are out of bounds / escape, subtract 1 again from your answer. Done! My submission at 294079080. Reply if you have more questions.
Never thought it would be a graph problem, thanks for your explanation :P.
I was able to solve D, but chocked on C :(
I too choked on C, but figured out that I was making a silly mistake. I was running if-else loops for the '?' marked cells instead of four separate if loops. This costed me whole hour lmao. For D, I was trying to first put all the 0's in correct positions, then 1 and 2's will eventually become easy to swap (I failed miserably).
How to solve F? I cant find any clear approach to solve this problem
Firstly, for simplicity, redefine the special conditions to be in terms of the number of rubies/sapphires in your satchel (not chest). Then add dummy states $$$(0, 0)$$$ and $$$(n, m)$$$ for convenience (we won't double value at these though).
Define dp states to be $$$dp[i]$$$, which is the total sum of value of your satchel across all ways you can reach the state defined by the $$$i$$$-th condition.
To solve this dp you will firstly need to define some ordering on the conditions so that when evaluating some dp state, all the states that it depends on have already been evaluated. Just sort by $$$x + y$$$.
Then, the transition from state $$$i$$$ to state $$$j$$$ will correspond to the ways you can go from state $$$i$$$ to state $$$j$$$ without visiting any other special condition state in between.
Computing the number of ways you can go from state $$$i$$$ to state $$$j$$$ (where $$$i$$$ occurs before $$$j$$$ in the topological ordering) without visiting any intermediate special condition state is easy and can be done using inclusion exclusion in $$$O(n^3)$$$. Call this $$$w[i][j]$$$.
Also define the total number of ways for us to go from state $$$i$$$ to $$$j$$$ to be $$$g[i][j]$$$. This can be computed in $$$O(1)$$$ using simple combinatorics.
Define the addition in value for going from state $$$i$$$ to state $$$j$$$ without any intermediate doubling to be some $$$h[i][j]$$$.
Then, the dp formulation for state $$$i$$$ is:
(where $j$ occurs before $$$i$$$ in the topological sort)
All states will be evaluated in $$$O(n^2)$$$.
The final answer is the value of the dp state corresponding to the the state $$$(n, m)$$$ divided by the total number of ways to go from $$$(0, 0)$$$ to $$$(n, m)$$$, which is just $$$\binom{n + m}{n}$$$.
Can you explain more about how to calculate $$$w(i, j)$$$ using inclusion exclusion, I still didn't get this part.
$$$w[i][i] = 1 \; \forall \; i$$$.
$$$w[i][j] = g[i][j] - \sum_{k} {w[i][k] \cdot g[k][j]}$$$ (here $$$i$$$ occurs before $$$j$$$ and $$$k$$$ occurs between $$$i$$$ and $$$j$$$ in the ordering)
Seems I got it, thanks!
I liked F. However E is bad.
(1) I believe it made the contest unfair that one sample testcase was silently added. What you should have done is to make a clarification as an annoucement instead.
(2) The essential part had appeared multiple times — IMO 2009 Shortlist C2 and UTPC2023 and possibly many others. The "distinct" part does not add fun (perhaps personal opinion).
who can tell me why runtime error pleaseYour text to link here...
D
294071265 this gives runtime error on pretest 8 for problem C . Can anyone tell what is the reason . I have not seen similar verdicts in any other solutions , so I am curious what caused this error ?
have you considered what would happen if dfs(i, j) went out of bounds?
How can this even happen , for all border elements which are overflowing i have assigned visited =1 and verdict=-1 initially only. Can you explain or give example
How to solve D ?
What I did was iterate until the columns are sorted. On each iteration I:
Swap the 1 that is furthest to the left with the 0 that it furthest to the right until all 0s are to the left of every 1.
Swap the 2 that is furthest to the left with the 1 that is furthest to the right until all 1s are to the left of every 2.
I did have to use a set to store the indexes otherwise it would TLE.
If there are only $$$0$$$'s and $$$1$$$'s or only $$$1$$$'s and $$$2$$$'s, just swap the values in the way Leongg wrote.
If the array contains all three numbers, then you must put all the $$$2$$$'s to the rightmost part of the array or (if more than half elements in the array are $$$2$$$'s) put all the $$$0$$$'s to the leftmost indices. If you have to swap $$$1$$$ and $$$2$$$ or $$$0$$$ and $$$1$$$, then just swap them. Otherwise you must do an intermediate swap involving any (for example, first to the left) $$$1$$$ in the array. If there were $$$2$$$, $$$1$$$, $$$0$$$ at some indices, after these two swaps you will have $$$1$$$, $$$0$$$, $$$2$$$ on these respective indices.
I can't imagine how many people were blocked by $$$n=m=1$$$ in $$$C$$$ and $$$n=k=1$$$ in $$$E$$$...
why is n=m=1 in C an edge case? I didn't consider this and it seems fine
if you have all ?-s in the grid, then n=m=1 is the only case you will have 0 as answer. otherwise the answer is n*m always.
but still depends on the implementation obviously, i failed it though
Wrong answer on test 4 ...
I realized right after the end of the contest is that the wrong with my code for $$$E$$$ is that I didn't handle the case where $$$n = 1$$$
it really hurts 😢
A regular request to increase the memory limit to allow solutions in python. Going from https://codeforces.net/contest/2034/submission/294035798 to https://codeforces.net/contest/2034/submission/294041682
was neither insightful nor fun.
BRO I passed A with 999ms whats on about the tight TL
I thought A was O(log(n)) per tc lol
same.. it showed a TLE on tc 8 for me first.. then after I refreshed , it showed ac ..
GreedyForces
idk how many CF rounds I have to do to stop wasting half an hour on finding N = K = 1 testcases on E and similar :v
If you have a hard time figuring that out, then what am I supposed to do? I missed two test cases in E....
& I used "int n" instead of "long long n" and couldn't debug it though i had 1 hours left. :) sadlyf.
I FST-ed on A :( Why half allow O(t*a*b) solution
loved the statements, especially the characters. look forward to seeing this competition continue in the coming years!
TLE on A system testing because of define int long long
because it's bad
Loved the images :)
гослинг?
I still do not understand why I got TLE on A and B in the system testing while the other similar answers were getting accepted...
A: https://codeforces.net/contest/2034/submission/294007119 B: https://codeforces.net/contest/2034/submission/294033976
In A, using int is faster than long-long
https://codeforces.net/contest/2034/submission/294091655
please someone help me in figuring out whats wrong in my code?
please!
Fixed in 297729300
The issue is that when this is executed:
j may be out of bounds.
yea i realised it later that night! just missed continue; in my code
Hoping to get my first t-shirt(among Randomly choosen 50 participants)
This is my code for question A but it has not been accepted and showing TLE . How is this possible. I have reviewed my code thoroughly and believe it is correct .The code should definitely work as the constraints are — (1≤a,b≤1000) and (1≤t≤100). Many with same logic have their solutions accepted. I kindly request re-evaluation of my submission.
Submission Id — 294008048
Your solution works in $$$O(tab)$$$, with the constraint the worst case is $$$10^3\times 10^3\times 10^2=10^8$$$.
However, the
%
operator has a large constant factor, which might case TLE in this case.#define int long long
also slow down your code a little bit.PS: your code runs for about 2700ms on AtCoder (usually faster than codeforces) in about a $$$8\times 10^7$$$ total product, which is within the constraint. It would definitely TLE in the worst case here.
problem con see hi
The fact that the glorious history of Iran and amazing myths were mentioned in the text of the questions made me proud that I was born in Iran. I hope this beautiful work will be repeated later.
unable to view the editorial
hello everyone do you know how to get job because i was recently graduated i don't know what to do
get good.
in what and how
This contest gave me 120+ delta and made me a Specialist <3 standings
can anybody give me the id of this contest
2034
thanks a lot man, how did you find it out
You can find it from the URL: codeforces.com/contest/ 2034
thanks a lot man contest was great fun , thank you for setting it up
vulestamenkovic orz
vulestamenkovic orz for being super sigma specialist.
orz TheWinnerOfEJOI2024
Nice problems! F2 and H are nice, even though I wasn't able to debug the latter in contest time :(
On a side note: Why insert the image in the middle? It randomly divides the statement into two parts, which can be really annoying when checking to see if you have missed something.
Runtime Error
AC
can someone explain why the first one gets Runtime error while the second code gets accepted?
C is too implementation heavy.
idk its pretty standard implementation, you probably just need to do more dfs/bfs problems
When will we know if we got tshirts or not?
Today I received this message:
Your solution 294541298 for task 2046D significantly coincides with the solutions of other participants and is in the group of identical solutions Hectonit/294541298, studboy/294566190.
This is unfair decision. The only similar parts of this submissions: mine, studboy — is parts with sets, which is not the main logical part. Main ideas looks quite similar, but ways of solving are different. Hope this misunderstanding will be fixed.
Hello, Timophey!
Detecting similarities between codes and marking them as potential cheating cases is not something handled by the problem authors. In fact, we aren’t informed when these checks are performed or who ends up being flagged as a result.
This process is part of the system’s automated operations. I believe reaching out to KAN or contacting the appropriate individuals in charge might help resolve this situation for you.
I’m sorry that I’m unable to assist directly with this matter.
best problems