r/competitivprogramming • u/[deleted] • Sep 29 '19
competitivprogramming has been created
A community for competitive programming. Ask for help, post memes, and enjoy!
r/competitivprogramming • u/[deleted] • Sep 29 '19
A community for competitive programming. Ask for help, post memes, and enjoy!
r/competitivprogramming • u/vorttxt • May 04 '20
#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 • u/[deleted] • May 03 '20
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 • u/[deleted] • Apr 03 '20
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= Truefor b in range(int(lister[1])):for a in range(int(lister[0])):if (S < int(K)):flag = Falsebreakif(a<=lister[1]-1 and a>0):S -= 1if(INPUT[b][a] == '*'):S += 5elif(INPUT[b][a] == '.'):S -= 2else:breakif(flag == False):breakif(S >= int(lister[2])):print("Yes\n",S)else:print("No")
r/competitivprogramming • u/Czikilla • Feb 16 '20
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 • u/AARKOMMIDI • Feb 16 '20
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 • u/thefreakingmind • Dec 24 '19
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 • u/[deleted] • Sep 29 '19
https://discord.gg/FubWtfe
Join the community!