Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Linq is just using someone else code.
Great kata. Very entertaining to solve. But i think it better fit 4 ku because of complication and some specific algorithm requirements
Look, we can be sure that the "remaining defending power" of
d
is 4-2=2. The rule about "more points than usual" means that if it was greater thand
's usual power (2), we would need to bring it down to 2 before attacking. In this case, it's not greater, so the remaining power stays unchanged and the rule doesn't really change the outcome. Similarly, ifsss
were attacking, the remaining power ofd
would stay at 1. That rule makes a difference in cases like attack from a singles
. The "remaining defending power" ofd
would be 4-1=3, but the attacking potential ofd
is limited at 2.Any ideas about how I can shortly express this in the description?
I have a question
What happens when attackers enter the trench and get defeated?
suppose the attack is:
"ss "
"--|dzp|"
as d is 2 but also the first one in the trench it's defending power becomes 4 successfully defending.
but now what?
what will be it's attacking power?
will it be (4 - 2) or (2 - 2), as you've said "it's not allowed to use more points than usual."?
Approved now. Thanks for reminder.
Figured I'd cause a notification here in case it's forgotten.
@numice you can change the signature of the constructor to
VersionManager(const std::string& version)
. As long as it compiles, it is a valid solution.I do think it's a bug
in JS in random tests first line sometimes lacks one last space so it is wrongly padded. Is it intended ?
Looks like a bug for me
No problem.
Hi, thanks. Looks good to me. Submit it here (so that you get the credit) and I'll accept it
Here is my JavaScript translation: https://www.codewars.com/kumite/6545ce33b3e7770024f678e2/edit
The description should mention that menu items must be displayed using
repr()
, notstr()
.For example,
"a"
must be displayed as'a'
, not asa
There were enough cases to get approved. You may always add more cases if you wish to.
You mean
"If it survives, then that's enough of advantage"
? Added that to the C version. Later I'll do renaming/minimization as discussedLoading more items...