# Problem solving

# Problem solving

vrotaru_md + 3 comments I'm looking at the second test case

5 1

5 3 4 5 6

And don't understand can it be solved in a day. We have 2 problems with the same difficulty level - 5.

Solving two problems with same difficulty in a day will be against the rules, right ?

nishant_304 + 0 comments [deleted]GrantDuan + 0 comments 5 in '5 3 4 5 6' do not mean difficulty.

ashwinscode + 1 comment It says that the two

**consecutive**problems that you solve in a given day should have a minimum difference of K in their vi ( and not every pair of problems that you solve in a given day)n=5, k=1; 5 3 4 5 6 is can be solved in a given day because that sequence has atleast a variation of 1 between consecutive numbers that is met.

However, if instead it was n=3, k=1; 5 5 6, then you need minimum 2 days to solve it.

pazdaniel7 + 1 comment It also mentions that the difficulty of problems within a same day must increase . So you cannot solve 3 4 5 5 6 in that order on a same day, because you are not increasing difficulty from 5 to 5. Therefore, I have the same doubt, seems like you need 2 days to solve the second example for me too.

reyvaj64 + 0 comments I can only assume that: " Problems with similar vi values are similar in nature" means you can solve all fives at the same time, but that might be stretching it

fengyuxue11011 + 0 comments it's a weird problem. Hard to understand.

samarthasthana11 + 0 comments Its really hard to understand the question. Can anyone please tell me what actually i have to do?

nachiketg + 1 comment Why is the answer to [41 335] as 5?

The following sequence looks valid and gives min days as 4.

Day 01: [0, 3, 4, 5, 7, 10, 13, 15, 18, 20, 21, 22, 24, 26, 27, 30, 34, 35, 36, 40] (Unsolved #20: all)

Day 02: [2, 6, 8, 12, 14, 16, 19, 20, 21, 23, 25, 26, 28, 31, 35, 37] (Unsolved #12: 2, 6, 8, 12, 14, 16, 19, 23, 25, 28, 31, 37)

Day 03: [1, 5, 9, 11, 13, 17, 18, 20, 21, 23, 29, 32, 34, 35, 38] (Unsolved #7: 1, 9, 11, 17, 29, 32, 38)

Day 04: [33, 35, 39] (Unsolved #2: 33, 39)

Fluffy_Bunny + 0 comments We are not allowed to solve the same 'problem' twice. That appears to be a requirement, judging by the expected answers.

It's not clearly stated in the description, though.

dancristianpetr1 + 0 comments A college have asked you to produce a console-based application to store studentsâ€™ detail and the course in which they are enrolled in. The application should have other additional functions like; a) Can add new student record. b) Can remove new student record based on ID. c) Can search a student record based on ID or phone number. d) Can check the whole list of students. e) Can check the list of students based on course.

ayanbahukhandi11 + 1 comment what is the vi value?? I don't understand it... The question maybe lame.. so pardon for that but I am new here.. Kindly help me.

ahmedhafez13 + 1 comment Problems with similar

*(vi)*values are similar in nature. v is a list of integers*(Example: v[0] = 5, v[1] = 4, v[2] = 7)*as it in first test. That means**the first**problem*(v[0] = 5)*differs from**the second**problem*(v[1] = 4)*by**1**(5-4=1) and**the second**problem*(v[1] = 4)*differs from**the third**problem*(v[3] = 7)*by**3**(4-7=3) regardless the sign (positive or negative).ayanbahukhandi11 + 0 comments Thank you very much... Now I get what's the problem is...

pb1038 + 1 comment testcase #1 [113 , 128]

Expected output is 5, where as my solution solves in 3 dayz. And seems correct to me..

Day 1 :: 383 694 335 335 160 986 355 762 973 542 717 853 663 483 218 16 507 852 365 791 264 492 173 38 538 860 281 988 857 591 342 971 353 666 512 70 518 362 84 352 113 301 507 639 365 33 876 680 142 413 970 637 171 957 761 466 315 887 184 40 970 536 153 622 394 791 290 110 632 265 736 549 296 878 314 834 199 950 356 156 794 469 157 961 824 287 678 141

Day 2 :: 422 422 958 763 400 155 829 668 490 155 539 845 650 815 327 674 934 172 359

Day 3 :: 440 851 174 872 105 246

Am I missing any constraint??

Fluffy_Bunny + 0 comments 335 appears twice in a row in day 1, and 422 does the same in day 2. Not valid when you have k=128.

clarson + 0 comments Can someone share how to use the STDIN and STDOUT for the built-in Java 7/8 Compilers? I'm used to the netbeans IDE which uses System.in

prakashchandu + 0 comments In the case#0 where can we solve that as 4,7 and 5 rather than 5,7 and 4..? (its used by sorting the ratings)

mesutekici + 1 comment Hi,

I still have hard time understanding why 5 3 4 5 6 can be solved on the same day as 5 and 5 are similar in nature and 5-5 = 0. But k=1, which means that 5 and 5 cannot be solved on the same day.

regards

CS_1716410156 + 0 comments did u understand that now?? coz i am not getting this same query..

Sort 21 Discussions, By:

Please Login in order to post a comment