Cody

Recent Activity

1 – 50 of 11,891

Rafael S.T. Vieira submitted a Comment to Problem 47103. Estimate Pi by Monte Carlo method

Tip: Generate the pair of numbers using p = rand(2,n)' (the order that numbers must be used: rand(n,2) does not work for instance); this will not solve the problem, but it's half way there.

1 hour and 42 minutes ago

Rafael S.T. Vieira submitted a Comment to Problem 47068. Set zero

The problem description should be set all numbers that are not on a border to zero.

3 hours and 48 minutes ago

kaatil_coder submitted a Comment to Solution 3376128

check the binomial expansion with negative exponent, to learn.

3 hours and 59 minutes ago

kaatil_coder submitted a Comment to Problem 2381. Sum of digit range

@Gareth @Dyuman If number of digits in A, n1 = 4, then A belongs to {10^4 to 10^5-1} You will be given n1 and n2. You need to find the sum of ( min and max number of digits ) in A*B.

4 hours and 35 minutes ago

Rafael S.T. Vieira submitted a Comment to Problem 44239. Mastermind IV: Optimal Solver - max of 5 guesses

Please do not insert a timer on your test suite. Cody already has one, so why not use it? I was under the impression that my implementation of Knuth's algorithm was wrong, when in fact it was only slow. Or if you do insert a timer, please, provide a better feedback. For instance: "your solution cracked all codes under 5 steps, but it will fail to solve them all on time".

7 hours and 35 minutes ago

Anton Casas submitted a Comment to Problem 2423. Integer Sequence - II : New Fibonacci

Probably the most satisfactory problem I've encountered this far. Wonderful!

9 hours and 17 minutes ago

Srimonti Dutta submitted a Comment to Solution 1936817

Just follow the Pythagoras theorem.

10 hours and 45 minutes ago

goc3 submitted a Comment to Problem 2230. Back to basics - array operations

@Nikolaos Nikolaou: while input variables are the same in test cases 7 and 8, they are passed to the function in different orders.

11 hours and 3 minutes ago

goc3 submitted a Comment to Problem 47103. Estimate Pi by Monte Carlo method

The test suite has been updated to check against a tolerance; hopefully that will overcome the concern mentioned by Undine Falkenhagen.

11 hours and 18 minutes ago

Nicolas Schoonbroodt submitted a Comment to Solution 3451468

Not the cleanest code (I would have used dtmc if the corresponding toolbox was available, and I should definitively improve the code quality itself and vectorize it a little bit) The problem was fun, thanks :-)

12 hours and 24 minutes ago

Nikolaos Nikolaou submitted a Comment to Problem 185. Data decompression

i donnot understand the uint8 twist :/

12 hours and 57 minutes ago

Nikolaos Nikolaou submitted a Comment to Problem 2230. Back to basics - array operations

test case 7 and 8 are identical with different result plz fix

16 hours and 4 minutes ago

Undine Falkenhagen submitted a Comment to Problem 47103. Estimate Pi by Monte Carlo method

My solution, although giving the correct answers (checked via "format longg" and accepted by the later tests), did not get accepted in the first test. Maybe there is a problem there?

17 hours and 47 minutes ago

Dyuman Joshi submitted a Comment to Problem 2381. Sum of digit range

Can anyone help me in understanding the problem statement? It's so confusing.

18 hours and 24 minutes ago

Jiseon Shin submitted a Comment to Problem 44311. Number of Even Elements in Fibonacci Sequence

My solution is working in my local computer but is not consistent with Test Suites starting from d = 100. I don't still get the answer.

19 hours and 1 minute ago

Rafael S.T. Vieira submitted a Comment to Problem 1701. Solve the picross! (Hard)

To any new challengers, know that only logic will not solve these puzzles. You will need some guessing, which means make the computer solve it as far as it can and then you, yes YOU, look at the picture (we humans can recognize the shape and finish the puzzle; the computer not so much). And, please, fell free to try some solvers out there.

22 hours and 41 minutes ago

Rafael S.T. Vieira submitted a Comment to Problem 1701. Solve the picross! (Hard)

Solving a grid of 75x60 squares within Cody's time limit is extra hard. The greatest challenge is to find a fast code; recursion with backtracking no longer seems like a viable option. And I do hope the author is aware that nonograms are an NP-hard problem, which means there is no known fast algorithm to solve the general case: we have to build one for the specific cases of the test suite.

on 27 Oct 2020 at 20:50

goc3 submitted a Comment to Problem 46873. Sum of terms in a series 2 (★★★)

The test suite is updated to use a tolerance check.

on 27 Oct 2020 at 17:41

goc3 submitted a Comment to Problem 980. Unique values without using UNIQUE function

The link has been updated.

on 27 Oct 2020 at 17:38

goc3 submitted a Comment to Problem 2029. Convert vector datasets to plot with imagesc instead of scatter

The test suite has been fixed as requested by Rafael S.T. Vieira.

on 27 Oct 2020 at 17:25

goc3 submitted a Comment to Problem 1591. Find the minimum element of the matrix

The last test case has been fixed.

on 27 Oct 2020 at 15:40

XC_Wang submitted a Comment to Solution 3435463

vpa function ?

on 27 Oct 2020 at 11:50

Lkhagvasuren Byambadorj submitted a Comment to Problem 2022. Find a Pythagorean triple

Thanks, enjoyed these.

on 27 Oct 2020 at 7:12

Rafael S.T. Vieira submitted a Comment to Problem 1700. Solve the picross! (Easy)

Nope, it's not easy. A grid of 20x20 squares is already considered hard by regular players because we have to keep in mind several possible intersections between possible solutions.

on 27 Oct 2020 at 4:24

Rafael S.T. Vieira submitted a Comment to Problem 46943. Cipher the number

I am not sure this method can be called a cipher since there is probably no way to recover the original number. You should probably call it a hash.

on 26 Oct 2020 at 22:54

Nikolaos Nikolaou submitted a Comment to Solution 553551

i thought it should be on the base of the number not 10 :/ am dumb

on 26 Oct 2020 at 19:02

goc3 submitted a Comment to Problem 601. Retirement savings

Variables for the first test were implicitly defined with global scope (lacked initial %%). They should now be constrained to just the first test case.

on 26 Oct 2020 at 17:54

goc3 submitted a Comment to Problem 44731. Find the Pattern

The function name has been changed to not conflict with a built-in function.

on 26 Oct 2020 at 17:31

goc3 submitted a Comment to Problem 67. Find common elements in matrix rows

Test cases with an empty result now test against isempty().

on 26 Oct 2020 at 17:11

goc3 submitted a Comment to Problem 850. Spectral Distance - Speed Scoring

The line referenced by Rafael S.T. Vieira (and prior comments) has been corrected.

on 26 Oct 2020 at 16:34

Lesandu Wenitha Sugathadasa submitted a Comment to Solution 3395103

Nice problem! Read the description carefully! The Oder of Coins is matter

on 26 Oct 2020 at 14:35

cokakola submitted a Comment to Problem 45396. Design a tubesheet for shell-and-tube heat exchangers

breaking the symmetry, one can place more holes in the circle!

on 26 Oct 2020 at 8:56

Tikay submitted a Comment to Problem 258. linear least squares fitting

Sorry, but I can not understand the problem to solve. Can anyone explain to me, please?

on 26 Oct 2020 at 6:28

Rafael S.T. Vieira submitted a Comment to Problem 44971. Convert base 10 to base x (2-16)

Oh, the problem was with my algorithm, sorry. I am indeed using python's long int (for multiplication of large integers), but I was relying on str2num for some operations (which apparently introduced floats back in my code). After removing it, it worked out fine. PS: This new update knocked out some wrong solutions (including some of mine). Awesome. :)

on 26 Oct 2020 at 5:55

Rafael S.T. Vieira submitted a Comment to Problem 44964. Optimal Asymmetric Encryption Padding of message for RSA Cryptography

Thanks, David. I've struggled for a while with this problem but I've finally figured it out. First, although we don't use the encryption function from 7.1.1, we must create an output EM of length k-1 and apply a pad of 0 as the first character of EM (It was strange to see all hashes starting with 0). Next, I was confused with the Feistel Network, because my MGF from the previous problem wasn't working (an accepted solution), but I realized that you were probably using a hex input, instead of char (which is weird since the MGF function requires an Octect String as input), but anyway that solved it. :)

on 26 Oct 2020 at 5:46

Rafael S.T. Vieira submitted a Comment to Problem 2451. BLOCK x3 (Version 1)

https://noodlecake.com/games/blockblockblock/ (The game is no longer available at Google Play).

on 26 Oct 2020 at 3:11

bainhome submitted a Comment to Solution 57169

This iterationg is good indeed.

on 26 Oct 2020 at 2:53

Rafael S.T. Vieira submitted a Comment to Problem 1015. Polynomial Interpolation

FYI: The condition number of the Vandermonde coefficient matrix is just the norm of the matrix times the norm of its inverse. Cheers. PS: Wikipedia will just lead you to a paid wall. Don't waste time.

on 26 Oct 2020 at 2:47

A C submitted a Comment to Problem 803. Twist 'n' Match

can you give an example of a matrix before and after?

on 26 Oct 2020 at 1:22

ChrisR submitted a Comment to Problem 47073. Find the nth Fibbinary number

Thanks Nikolaos. I was thinking of making a group on primes, but one on sequences and series is a good idea.

on 25 Oct 2020 at 22:56

David Hill submitted a Comment to Problem 44964. Optimal Asymmetric Encryption Padding of message for RSA Cryptography

Yes, changed description to the proper section 9.1.1.1. The steps show how the MGF1 function is used. Look at figure 1. There are not multiple rounds.

on 25 Oct 2020 at 22:18

David Hill submitted a Comment to Problem 44971. Convert base 10 to base x (2-16)

Not sure what the problem was, but I changed #6 and added some additional test problems.

on 25 Oct 2020 at 21:45

Rafael S.T. Vieira submitted a Comment to Problem 44971. Convert base 10 to base x (2-16)

It seems the precision issues were indeed fixed. :)

on 25 Oct 2020 at 21:41

Dyuman Joshi submitted a Comment to Problem 44492. Approximate the cosine function

@Shaul, people can use 1/sec(x) (which, btw, is also the leading solution) as a solution and you might want to change the test suites accordingly.

on 25 Oct 2020 at 19:00

bainhome submitted a Comment to Solution 3379238

Second thought: I believe this algorithm is not bullet-proof. what if a = [4,6,12,18]?

on 25 Oct 2020 at 18:43

Anton Casas submitted a Comment to Problem 34. Binary numbers

Very fun problem!

on 25 Oct 2020 at 14:55

Dyuman Joshi submitted a Comment to Problem 44634. Basic matrix operations using standard MATLAB commands

In addition to what David has mentioned, use tolerance based methods while dealing with floats instead of using isequal, which is just lazy.

on 25 Oct 2020 at 14:17

BunnY submitted a Comment to Problem 769. Calculate the area of a triangle between three points

Would the use of polyarea(x,y) work? I tried but I'm getting an issue to submit!

on 25 Oct 2020 at 13:09

Nikolaos Nikolaou submitted a Comment to Problem 47073. Find the nth Fibbinary number

Its a nice series of problems and i think there are more than enough untied problems for another Sequence and Series problem group. So maybe Chris its about time to curate one :)

on 25 Oct 2020 at 10:36

Rafael S.T. Vieira submitted a Comment to Problem 45320. SHA256 Hashing

The hardest thing is to use a hexadecimal input. Most on-line sites deal only with text. Exception: https://emn178.github.io/online-tools/sha256.html

on 25 Oct 2020 at 8:26

1 – 50 of 11,891