r/programmingcontests • • Feb 28 '21

cpbooster

5 Upvotes

Hey guys, I wanted to share my latest project: cpbooster which is a cross-platform CLI tool designed to boost competitive programmer's speed during contests by automating various routine tasks like testing, debugging, cloning testcases, etc. The console command suits any coding environment (i.e. VSCode, Jetbrains IDEs, Vim, Emacs, Geany, Sublime Text, ...) and it’s very easy to use. Vim users can install cpbooster.vim plugin to boost their speed even more.

Update V2: checkout the new website https://searleser97.github.io/cpbooster/

Installation instructions and more details here: https://github.com/searleser97/cpbooster


r/programmingcontests • • May 24 '23

Competitive programmers, besides changes in rating, what do you guys look for the most in a contest? I would appreciate it if you guys could list as much as possible.

4 Upvotes

r/programmingcontests • • May 08 '23

Need place to discuss hard problems

4 Upvotes

Sometimes I encounter difficult problems that I can't solve myself. So I need a place (for example, a forum or group) to discuss those problems. Any suggestions?


r/programmingcontests • • Mar 10 '23

Stuck on UVA-116

4 Upvotes

Heya, i'm not sure if this subreddit was meant for asking help with such stuff but alas.

Problem link :
Vjudge
UVA (i prefer vjudge obviously)

Language : C++

Getting WA
i tried all the user given test cases on Udebug, passed all :/, seems like a dead end

*My code link*
Linked from Vjudge directly because i don't understand how posting code on reddit would work tbh


r/programmingcontests • • Sep 22 '22

How are they "Red Coder" ?!

4 Upvotes

I started Programming for nearly a year on CodeForces and I can’t reach 1200 rate , I think it’s impossible for me to reach this rate with my level. I want to have a small conversation with anyone have 1400 rate or have a higher experience to guide me or only to know what they are doing in their daily routine ,Is it a cheat code or magic power to become a red coder?!


r/programmingcontests • • May 13 '22

When do you find it is optimal to look at the solution?

4 Upvotes

I find that if I don't try to solve the problem on my own first and immediately look at a working solution, I can learn the pattern quickly, but not well enough that I can later recall it for a novel problem.

For programmers who have become good at these types of problems, what is your approach to training in terms of trying it on your own before looking up the solution?

  1. How long is too long struggling through the problem on your own?

  2. When you look at solutions, do you find that the quantity of problems solved helps you learn the patterns needed to solve problem variants?


r/programmingcontests • • May 05 '22

how much progress can i make in 1 year?

4 Upvotes

Greetings, I've recently started to learn C++ and basic combinatorics (been only 2 weeks since I have started) and I would like to know which programmer color I can reach at most in one year of practicing for codeforces (e.g. cyan , blue , red and so on...)?


r/programmingcontests • • Feb 03 '22

Setting up vscode for C++ (competitive programming)

4 Upvotes

Hello,

As many of you would know, < bits/stdc++.h > is pretty famous header file for C++ for use in competitive programming. However whenever I try to use it, vscode starts giving error. So this is the program I have written

These are the errors I am getting when I try to "Run Build Task".

However if I change the first line to "#include <iostream>" , all the errors vanish and the task builds successfully.

I have also added the path to the "include" folder(in the mingw folder) in the "includePath" in configurations in "c_cpp_properties.json".

What am I doing wrong? Please help!

If the pictures are not clear, please tell me I will edit the post and paste the error lines here itself or post a zoomed in picture of the error.

Edit: If errors at terminal are more relevant to solve the problem I can share those too. (I am still a beginner to programming so don't such stuff)


r/programmingcontests • • Jan 14 '22

I feel like I was not made for cp even though I'm interested in it.

4 Upvotes

I was solving a codeforces problem from the problem set and it was supposed to be an easy problem but I overthought the problem and it took way longer than expected and I feel stupid. Am I not made for cp? Did you guys make mistakes like I do when yall began cp?


r/programmingcontests • • Nov 18 '21

CodeCom 2021

4 Upvotes

πŸŽ‰ CodeCom 2021 πŸ–₯️

━━━━━━━━━━━━━━

Join us for our 2nd annual CodeCom, December 1st – 14th.

You can submit on our Discord Server or on Repl.it using #codecom

1st Place: $20 + choice of Discord Nitro OR Replit Hacker Plan + More

πŸ₯ CodeCom ⌚

Every year we host a large coding competition. Each year the theme is different, but the magic stays the same. The competition is very open-ended, so creativity is front and center. We try to make it accessible to all yet fun for even the most advanced. We try to make things, that most people would never think about making. πŸƒ The prizes are great too, a gift card of your choice, for 1st, 2nd, and 3rd places. And it is free to enter!

We hope to see you soon!
https://discord.gg/KqhqnHrrZJ

https://eps.hg0428.repl.co/CodeCom


r/programmingcontests • • May 24 '20

I Made An Android App That Will Help Competitive Programmers To Keep Themselves Updated With All The Upcoming & Ongoing Coding Contests, Taking Place On Big Coding Platforms.

4 Upvotes

I'm a 2nd-year university student and I've been programming for almost 2 years now. A lot of fellow programmers will agree on the fact that one of best ways to actually master data structure and algorithm is to take part in as many coding competitions as possible. I used to wake up in the morning and visit all the major coding websites to see if there was a contest today. And since there are so many of them, losing track of a few of the contest wasn't something new.

So in order to solve this problem I decided to make an android app that would fetch the contest's schedule from all the major coding websites and display all of them in a single place. No sooner I made the app, I distributed it to all my friends and they find it extremely useful. So I decided to put the app on play store for other people to explore and use.

Few pointers on the app:-

- The app is and will always be ad-free

- The app is made using the flutter framework

- LINK TO THE PLAYSTORE


r/programmingcontests • • May 18 '20

Advice on crafting competitive programming training schedule

4 Upvotes

Hello!

I plan on spending this summer working on my competitive programming skills through Codeforces. For background, I am currently ranked as a Specialist and aiming by August to reach Expert or (optimistically) Candidate Master.

I was wondering how other competitors planned out a day-to-day training schedule for themselves. Obviously practicing is key to contest success, but I feel like my practice sessions are scattered and unfocused as I pick random problems to solve/think over. A few particular questions I have are:

  • How (generally) do people pick problems to solve? On CF specifically, do people choose a certain contest to completely solve or go by tags/filtering?

  • What's a good rule of thumb when it comes to deciding how long to invest in a problem before reading the editorial?

Would love any ideas the community has to offer. Thanks!


r/programmingcontests • • Feb 02 '24

Vietnam to host ICPC Asia Championship contest for the first time.

Thumbnail
vietnamnet.vn
3 Upvotes

r/programmingcontests • • Jan 28 '24

[Help Wanted] Returning final array after performing queries on it

3 Upvotes

I recently came across a question which said, "Starting from an array of size n filled with zeros, update the array based on an array of queries and return the final array". The queries provided were form int[], where q[0] was the starting index, and q[1] was an integer. The update process was updating arr[j] = arr[j] + x - |j - i| for all j where |j - i| < x. I hope I did a good job of explaining the question.

I have never really seen this pattern before, and I couldn't think of any tricks to apply. I tried a brute force solution where I loop through all the queries and update the array with an inner while loop. This of course is quadratic in time and too slow for the constraints (n <= 10 ** 5). I tried reading online and came across something called Mo's algorithm which I am not very familiar with but regardless, I read that Mo's algorithm can only be applied if the array is not being changed which is not the case here. Then I read about using a combination of difference arrays and prefix sums to solve this but I couldn't really understand that approach either. Any help would be greatly appreciated!

Edit: fixed typos


r/programmingcontests • • Dec 13 '23

Algorithm to obtain indices of list where list element resets to near zero

3 Upvotes

I have list of increasing and decreasing float values:

As you can see in the image, the values may increase or decrease and may suddenly reset to near zero value. I want to know exactly where these values reset to near zero value.

I tried something like this:

# input list of floats
# floats = [...]

# find the absolute difference between consecutive values
diff_floats = [abs(floats[i] - floats[i-1]) for i in range(1, len(floats))]

# Sort the list in descending order
sorted_diff_floats = sorted(diff_floats, reverse=True)

# Calculate the average of the top 14 differences
threshold = sum(sorted_diff_floats[:14]) / 14

# Count the number of values greater than the threshold
print(len([value for value in diff_floats if value > threshold]))

I hard coded 14, since I know that empirically the reset did not happen more than 7 times. So better to get top 14 differences average, instead of average of all values.

I am yet to get index of these resets which I can easily get by modifying last line of the code. But I feel the logic can still be improved to work on any input list of floats without considering the empirical knowledge of 7 resets.

How what could be the generatlised solution?


r/programmingcontests • • Dec 11 '23

How to solve this problem?

3 Upvotes

Bruce recently got a job at NEERC (Numeric Expression Engineering & Research Center), where they study and build many different curious numbers. His first assignment was a study of decimal numbers. A natural number is called a binary number if its decimal representation is a suffix of its binary representation; both the binary and decimal representations are considered without leading zeros. For example, 1010 = 10102, so 10 is a bivariate number. The numbers 101010 = 11111100102 and 4210 = 1010102 are not decimal. First, Bruce wants to create a list of bicentennial numbers. Help him find the nth smallest bicentennial number.

Input

One integer n (1 ≀ n ≀ 10 000).

Output data

Print one number - the n-th smallest bipartite number in decimal representation.


r/programmingcontests • • Sep 29 '23

DAIS Coding Challenge on Sunday!

3 Upvotes

πŸ‘¨β€πŸ’» The Dhirubhai Ambani International School Coding Challenge is back for 2023! πŸ‘©β€πŸ’»

Hello coders! Dive into the world of tech and innovation with the DAIS Coding Challenge. Crafted and hosted by Y12 DAIS students, our challenge is a chance for everyone to showcase their coding prowess, creativity, and problem-solving acumen.

Our website: https://www.daiscodingchallenge.com/

Age Categories:

Juniors: 13 - 15 years

Seniors: 16 - 18 years

CODEVENTS:

🌐 CODECANVAS (Teams of up to 4, each member <=18 years): Got a knack for web and app development? Receive unique prompts 2 weeks in advance and let your imagination run wild!

βš” CODEQUEST (Solos): Embark on a coding journey with a series of questions of varying difficulty. The best solutions are those that are efficient and effective.

πŸ“… When? CodeQuest: 1st October, 4 pm to 7 pm | CodeCanvas: 10th October EOD

πŸ‘Ύ Where? Online: Discord

πŸ“ How? Registration is online through Google Forms (link below) - All proceeds go to charity!

πŸ† What do YOU get? Certificates of recognition (gold, silver, and bronze awards) and participation. Appreciation post on our socials (Instagram, website, etc)

What’s more? Not only will you get to showcase your skills and earn accolades, but the entry fees will also contribute to a noble cause, supporting the education of fellow students.

Spread the word, gather your peers, and let’s make this a competition to remember! For details and registration: https://forms.gle/mLmRCvnHMmMbx5Zq7.

For queries:

Email: [email protected]

Instagram: dais.coding.challenge

MS Teams: Aryan.2216019, Yashraj.1001059, Tanay.1910012, Srushti.2216016

P.S. Feel free to share this among other groups and invite every young coder youΒ know!Β πŸŽ‰πŸ–₯πŸ”₯


r/programmingcontests • • Jul 28 '23

my first programming competition is in a month, I need help!

3 Upvotes

Hello, im having my first programming competition in a month and 10 days, its a subcontest of the ACPC (regionals of ICPC), and i have a 3 questions hopefully someone is able to answer:
1- teams are of 3, there is 1 computer, what are the available roles that should be fulfilled by each member of the team?
2- on what software will we be writing our code?
3- is there a list somewhere of all the topics that are included in the competition?

Thanks in advance.


r/programmingcontests • • Jun 06 '23

How do I get started??

3 Upvotes

I'm a high school student who has little python knowledge, most of the basics down. I plan on programming in python a bit more until i'm familiar with all of the basics then moving onto another language like Java.

I find math and problem solving interesting, even though I struggle and overthink everything. I've come across competitive programming on youtube and it grabbed my attention.

I plan to get better at Java and my programming & problem solving skills via CP. You can think of me as an absolute beginner. What tips would you give me on starting with my journey and progressing.


r/programmingcontests • • Mar 26 '23

GPT4 cannot solve coding problems

3 Upvotes

r/programmingcontests • • Feb 24 '23

doubt regarding cp resource

3 Upvotes

https://www.youtube.com/watch?v=OMcxQ3IY-qc&list=PLauivoElc3ggagradg8MfOZreCMmXMmJ-

yha se dsa krlu? pls review only if you hv dn this course thank you


r/programmingcontests • • Feb 19 '23

Weekly chess engine tournament

Thumbnail chess.dev
3 Upvotes

r/programmingcontests • • Nov 18 '22

Sebi and the equation problem

3 Upvotes

I was trying out this codechef problem.

Given four numbers A, B, C and N; find x and y satisfying equation x * y = (x | y) * (x & y) + A * x + B * y + C where | is bitwise OR, & is bitwise AND, x<=N and y<=N . Let X be the sum of x's for all solutions (x, y) and Y be the sum of y's for all solutions (x, y). Print X, Y.

I solved it with naive approach:

from sys import stdin
lines = stdin.read().splitlines()

def getABCN(line):
    A, B, C, N = line.split()
    return int(A), int(B), int(C), int(N)
    
def solve(A, B, C, N):
    X = Y = 0

    for x in range(N+1):
        Ax = A * x

        for y in range(x+1):
            if (x*y) == ((x | y) * (x & y) + Ax + B*y + C):
                # print(x, y, X, Y)
                if x == y:
                    X += x
                    Y += y
                else:
                    X += x + y
                    Y += x + y
                print(x, y, X, Y)

    return X, Y
    
t = int(lines[0])

for line in lines[1:]:
    A, B, C, N = getABCN(line)
    X, Y = solve(A,B,C,N)
    print(X,Y)

It seem to pass some test case, but fail other hidden test cases. It seem that I miss basic tricks of bitwise or arithmetic calculations. How do I solve this problem?


r/programmingcontests • • Oct 31 '22

Any good calendar that tracks both online and offline competitions and events?

3 Upvotes

A lot of the "calendars" are unmaintained or incomplete. Usually they just scrape online websites like topcoder for their regular competitions. And for some reason skip stuffs like ICPC or Advent of Code. It'd also be nice if the calendar tracks IOI and other larger local offline competitions too.