r/competitivprogramming • • Sep 29 '19

competitivprogramming has been created

2 Upvotes

A community for competitive programming. Ask for help, post memes, and enjoy!


r/competitivprogramming • • May 04 '20

C++ codeforce problem

1 Upvotes

#include <iostream>

using namespace std;

int main () {

int n, k;

cin >> n >> k;

if (n % 10 == 0) {

return n / 10;

}

else {

for (int i = 0; i < k + 1; i--)

return n / 10;

}

cout << n;

}

can anyone tell me why I keep getting no output or errors? the sample input is 512 for n and 4 for k


r/competitivprogramming • • May 03 '20

Squash the bugs codechef

1 Upvotes

I am facing problem in this question. How can I approach this problem.

http://www.codechef.com/problems/B5

Any method. I need some explanation. 😅


r/competitivprogramming • • Apr 03 '20

I solved, but the website isn't accepting.

1 Upvotes

can someone please tell me why isn't my code acceptable to the website
here's the problem:
https://hack.codingblocks.com/app/practice/6/1051/problem
here's my code:

lister = []
N,M,K,S = input().split()
lister.append(int(N))
lister.append(int(M))
lister.append(int(K))
lister.append(int(S))
INPUT = []
for b in range(int(lister[1])):
innerINP = []
inPut = input().split()
for a in range(int(lister[0])):
innerINP.append(inPut[a])
INPUT.append(innerINP)
S = lister[3]
flag= True
for b in range(int(lister[1])):
for a in range(int(lister[0])):
if (S < int(K)):
flag = False
break
if(a<=lister[1]-1 and a>0):
S -= 1
if(INPUT[b][a] == '*'):
S += 5
elif(INPUT[b][a] == '.'):
S -= 2
else:
break
if(flag == False):
break
if(S >= int(lister[2])):
print("Yes\n",S)
else:
print("No")


r/competitivprogramming • • Feb 16 '20

Guidance needed gor competitive coding

1 Upvotes

I know only a bit of c++ and it's my 4th semester already 😓..what would be the efficient way for me to excel in this sport...i did my research on this could not find any answer


r/competitivprogramming • • Feb 16 '20

Filling up a 3x3 matrix

1 Upvotes

Fill no of possibilities for a 3x3 matrix with distinct elements(1<=value of element <=1000) satisfying given row's-sum ,column's-sum and diagonal's-sum ?(8 equations with 9 unknowns)


r/competitivprogramming • • Dec 24 '19

EMaxx for Java

1 Upvotes

Hope you Might Know about Emaxx https://cp-algorithms.com/ in C++ for Learning Algo for Competitive Programming. I am working on a Project to Build Emaxx for Java. So our Java Community can do better at CP. People Like Petr, Egor, Akshay Miterani, Gaurav Sen, Summet Kumar did and become cp legend in Java. We need to provide good resources for people to Adapt Java More in CP. Kindly Reply to this comment. I will be Sharing a Discord link to Join.

Lets Make Java Great Again.


r/competitivprogramming • • Sep 29 '19

Join the discord!

1 Upvotes

https://discord.gg/FubWtfe
Join the community!


r/competitivprogramming • • Jun 05 '20

How to Deploy Website For Free 2020 | Free Domain | Free Web Hosting | F...

Thumbnail
youtube.com
0 Upvotes