anyway, I suggest banning inflammatory language in questions, such as "lowly tab users", "evil tab users", "incorrect, bad, and inferior form of whitespace", "Tabs Must Die", "this is an evil tab" etc
I'm sure you know about the $9.99 price scheme, instead of using $10. Well, in your new job as a sys admin at a large retail store, they want prices to adhere to a similar scheme:
All prices are in whole dollars, no cents.
All prices should end with 5 or 9, rounding to the closest one but up if...
for the problem https://www.hackerrank.com/challenges/chocolate-feast
below is the code I wrote:
#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
int availOff(int wrap, int m){
int r=0;
while(wrap>=m){
r+=wrap/m;
...
@Justin Yes, we're still friends :P (although he no longer goes to my school)
@aditsu Even when used humorously and not intended to be taken seriously? It's all in the name of fun, which is mostly what this site is about anyway...
I'm sure you know about the $9.99 price scheme, instead of using $10. Well, in your new job as a sys admin at a large retail store, they want prices to adhere to a similar scheme:
All prices are in whole dollars, no cents.
All prices should end with 5 or 9, rounding to the closest but up if the...
Are people not allowed to edit challenges to clear things up now? Peter added a test case that would have clarified at least one of the concerns on that, but it seems like it was flatly denied.
As far as I can tell in the OP, the word "price" was only ever used for the output, so "The lowest possible price is $5" made perfect sense to me as output.
Don't get me wrong, I don't often edit questions. But this case seemed like a bit too much caution for something so simple.
@Geobits Sp thought it was input, I thought it was input, aditsu wasn't sure, you and Peter thought it was output. I think this kind of case is what unclear CVs are for.
@MartinBüttner I don't disagree with anyone who CVd. If you thought it was unclear that's the right thing to do and all. I'm saying that rejecting an edit that would clear it up (either way) makes less sense, that's all.
My first challenge in a long time. Feedback would be appreciated!
Last Minute Shipments
code-golf optimization
Here's the situation: You're an engineer for Acme Rail Shipping Inc. There's a string of shipments to make for tomorrow but it turns out at the last moment that they're actually expec...
Counting groups of a given size
code-golf math abstract-algebra
Groups
In abstract algebra, a group is a tuple (G, ∗), where G is a set and ∗ is a function G × G -> G such that the following holds:
For all x, y, z in G, (x ∗ y) ∗ z = x ∗ (y ∗ z).
There exists an element e in G such that x ∗ ...
@Shazback It really depends mainly on the particular edits. There are a few different opinions on editing challenges here, but if it's a major edit, it's more likely to be rejected/reverted.
@Optimizer Maybe it's counting posted/deleted also, which the question list doesn't show.
I am trying to solve this problem which has exactly same language as this one but with very tight time limit and hard test cases! Now I have solved the problem on SPOJ with Dinic but I am getting TLE on Vietnam SPOJ? Now I want to know how can I approach this problem?
PS: I am particularly inte...
1) we don't know the interval the stat is for. 2) I think its unethical, even for the same of experimentation. 3) I am sure mods can simply clear our doubts :)
1, 2, Fizz, 4, Buzz
code-golf
Challenge
Write a program that prints the numbers from 1 to 100 inclusive. But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”. For numbers which are multiples of both three and five print “FizzBuzz”.
Output
T...
I say post this in a week or two... @MartinBüttner @Dennis What do you think?
@ZachGates in your code, when the the IP hits the corner on the middle, if the current memory edge is positive the code will continue on the bottom row. if the current memory edge is zero or negative the code will loop back to the start.
Groups
In abstract algebra, a group is a tuple (G, ∗), where G is a set and ∗ is a function G × G -> G such that the following holds:
For all x, y, z in G, (x ∗ y) ∗ z = x ∗ (y ∗ z).
There exists an element e in G such that for all x in G, x ∗ e = x.
For each x in G, there exists an element y ...
it's even stranger to realize that you can choose whether there exists an amount that is smaller than the amount of real numbers, but smaller than the amount of integers
In mathematics, the continuum hypothesis is a hypothesis about the possible sizes of infinite sets. It states:
There is no set whose cardinality is strictly between that of the integers and the real numbers.
The continuum hypothesis was advanced by Georg Cantor in 1878, and establishing its truth or falsehood is the first of Hilbert's 23 problems presented in the year 1900. Τhe answer to this problem is independent of ZFC set theory, so that either the continuum hypothesis or its negation can be added as an axiom to ZFC set theory, with the resulting theory being consistent if and only if ZFC is...