Cody

Recent Activity

1 – 50 of 10,693

Haoyu Dai submitted a Comment to Solution 2411043

function b = matchPattern(a) b=[]; len=length(a(1,:))-1; [r,c]=size(a); pattern=zeros(r-1,len); for j=1:r for i=1:len if a(j,i+1)>a(j,i) pattern(j,i)=1; elseif a(j,i+1)<a(j,i) pattern(j,i)=-1; else pattern(j,i)=0; end end end for j=2:r if isequal(pattern(j,:),pattern(1,:))==1 b=[b j]; end end end

4 hours and 28 minutes ago

Victor Quezada submitted a Comment to Solution 2406839

The suggestion leads to wrong answers because of "ans".

13 hours and 10 minutes ago

Victor Quezada submitted a Comment to Solution 2404799

Test suite is wrong. Correct or remove.

15 hours and 16 minutes ago

Victor Quezada submitted a Comment to Solution 2404519

Poorly posed problem. It should be removed. The author wanted perhaps to reproduce something like: https://www.youtube.com/watch?v=QKhy1JsdiUo

15 hours and 28 minutes ago

Karl Ezra Pilario submitted a Comment to Solution 2290704

This solution can be improved if line 6 becomes: a(P(j,1),P(j,2)) = a(P(j,1),P(j,2)) + P(j,3); I'm sorry for the confusion. You see, there can be more than 1 path between two points.

17 hours and 27 minutes ago

Karl Ezra Pilario submitted a Comment to Problem 45500. Maximize the production in a plant within equipment capacity

To clarify, here is a possible breakdown for Test Case 15: [34 goods can flow along path 1-2-10-11] + [2 goods can flow along path 1-3-4-8-11] + [8 goods can flow along path 1-3-7-9-11] = 34 + 2 + 8 = 44. Take note that we can flow 34 goods from Point 10 to Point 11.

17 hours and 34 minutes ago

suman Bhullar submitted a Comment to Solution 2378353

bmi_correct and bmi_calculator are same. even then I am getting assertion error

on 26 May 2020 at 11:33

William submitted a Comment to Problem 45434. Weighted Names

Asif, It seems that something is messed up. You didn't say how to score a suffix. If a suffix is scored with the same weight as a last name, then "William III" should score higher than 'William II' in problem 5. If the suffix is not scored at all, then 'william' should score higher than 'William II' or 'William III'. The same sort of problem occurs in problem 4.

on 23 May 2020 at 14:53

Joao Maciel submitted a Comment to Problem 658. Find the biggest empty box

Nice!

on 23 May 2020 at 6:58

Dwarakesh Divya Kanth Padala submitted a Comment to Solution 1917777

Nice!

on 22 May 2020 at 21:42

elaine parshall submitted a Comment to Solution 2339888

This example doesn't work, should be z = dot(x,y), or z = sum(x.*y)

on 22 May 2020 at 19:37

Gregory Karathymios submitted a Comment to Solution 2333153

function m = plot_cos(y, t) [m,idx]=min(y); t_m=t(idx); plot(y,t,'b--',m,t_m,'r*') end why doesn't it work? It gives the error "Check plotted data" but my data works just fine on my pc. Any ideas on why it doesn't accept my solution?

on 22 May 2020 at 12:13

SHIVANI CHORGE submitted a Comment to Solution 2257445

fist find maximum age then use index of maximum age and by using that find corresponding name

on 22 May 2020 at 12:02

bin liu submitted a Comment to Solution 611264

???

on 21 May 2020 at 11:37

EMRE DÜZ submitted a Comment to Solution 2308688

good question

on 20 May 2020 at 15:10

Haoyu Dai submitted a Comment to Solution 2302540

function y = CountSeq(x) ele=[]; cnt=[]; ele=[ele x(1)]; cnt=ones(1,20); L=length(x); k=1; for i=2:L if x(i)==x(i-1) cnt(k)=cnt(k)+1; else ele=[ele x(i)]; k=k+1; end end L1=length(ele); y=zeros(1,2*L1); for i=1:L1 y(2*i-1)=cnt(i); y(2*i)=ele(i); end end

on 20 May 2020 at 5:42

ZG LIN submitted a Comment to Problem 672. Longest run of consecutive numbers

Nice

on 20 May 2020 at 2:49

Haoyu Dai submitted a Comment to Solution 2301094

function i = running_product(s) L=length(s); L1=L-4; tmp=0; i=0; for j=1:L1 m=str2num(s(j))*str2num(s(j+1))*str2num(s(j+2))*str2num(s(j+3))*str2num(s(j+4)); if m>tmp tmp=m; i=j; end end end

on 20 May 2020 at 2:33

MAYANK MITTAL submitted a Comment to Solution 2297265

this is a good problem . i learn a lot from this w=hw(:,2) w=w./2.2 h=hw(:,1) h=1./[[h.*.0254].^2] bmi=w.*h solution for help

on 19 May 2020 at 17:19

Yuval Levental submitted a Comment to Solution 2294098

It is interesting because it is thick pi z*z a pie.

on 19 May 2020 at 1:46

Yuval Levental submitted a Comment to Solution 2294068

Please correct this problem. The output is y when it should be z_correct.

on 19 May 2020 at 1:23

Cody Admin submitted a Comment to Solution 2291993

test comment

on 18 May 2020 at 14:33

Cody Admin submitted a Comment to Solution 2291993

solution comment

on 18 May 2020 at 14:33

Trusted submitted a Comment to Problem 26. Determine if input is odd

Adding comment for testing badges!!

on 18 May 2020 at 13:38

Trusted submitted a Comment to Solution 2291834

Adding comment for testing badges!!

on 18 May 2020 at 13:07

silki baghla submitted a Comment to Solution 2285385

Anyone who has solved the problem, please help.I have developed the code according to the details and it's working well in matlab. I dont know why it is incorrect here.

on 18 May 2020 at 6:09

bainhome submitted a Comment to Problem 45503. Place wastewater treatment processes in the correct order

This whole set of Chem problems are all inspiring, I do enjoy solving every single one of them. please keep it up, hope we can see more.

on 18 May 2020 at 5:05

William submitted a Comment to Problem 45500. Maximize the production in a plant within equipment capacity

I'm confused! Two successful solutions have been submitted, but I would swear that the test suite answers for problems 6 and 15 are incorrect. In problem 15, it is easy to see that there is no way to get a production rate higher than 43; yet the answer given is 44.

on 17 May 2020 at 21:01

Edward Vaughn submitted a Comment to Solution 2289798

I see I'm going to have to memorize a lot of this syntax to make my life easier.

on 17 May 2020 at 15:19

Edward Vaughn submitted a Comment to Solution 2289794

Very easy :p Needed the confidence booster lmao

on 17 May 2020 at 15:16

swagata laxmi sengupta submitted a Comment to Solution 2289691

this was so easy

on 17 May 2020 at 14:44

Cody Admin submitted a Comment to Solution 2289368

test comment

on 17 May 2020 at 13:00

Cody Admin submitted a Comment to Solution 2289368

solution comment

on 17 May 2020 at 12:59

Trusted submitted a Comment to Solution 2289121

Adding comment for testing badges!!

on 17 May 2020 at 12:13

Stanislao Pinzón submitted a Comment to Problem 2351. Replace Nonzero Numbers with 1

It should be mentioned that 1 must be placed in the non-zero elements except for NaN.

on 17 May 2020 at 11:38

SHIVAM SUNDRIYAL submitted a Comment to Problem 167. Pizza!

nice problem!!

on 17 May 2020 at 11:14

Ali Osman Üstünel submitted a Comment to Solution 2288134

good

on 17 May 2020 at 4:17

Murat Coskun submitted a Comment to Problem 167. Pizza!

good

on 16 May 2020 at 16:36

Trusted submitted a Comment to Solution 2286146

Adding comment for testing badges!!

on 16 May 2020 at 13:13

Trusted submitted a Comment to Problem 26. Determine if input is odd

Adding comment for testing badges!!

on 16 May 2020 at 13:06

Cody Admin submitted a Comment to Solution 2286295

test comment

on 16 May 2020 at 13:04

Cody Admin submitted a Comment to Solution 2286295

solution comment

on 16 May 2020 at 13:04

Nikolaos Nikolaou submitted a Comment to Problem 1187. Knave in the middle attack

Broken test suite? The handle wont work in some cases

on 16 May 2020 at 11:19

Paresh yeole submitted a Comment to Problem 1309. matlab indian players

Please remove this Question. Cody platform is not for shotout!!

on 16 May 2020 at 11:01

Nikolaos Nikolaou submitted a Comment to Problem 1189. Knights and Knaves (part 3)

Very fun problem Thanks!

on 16 May 2020 at 10:15

silki baghla submitted a Comment to Solution 2285457

I have submitted the code which is working exactly as required in matlab script but cody is not accepting my solution.Please help

on 16 May 2020 at 7:36

silki baghla submitted a Comment to Solution 2285385

I am not getting the error in my code.Though,its working in MATLAB script.please help

on 16 May 2020 at 6:47

1 – 50 of 10,693