• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Hackereath ICPC Team Management problem

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello All ! I wrote a program to solve the ICPC team management question on Hackerearth. I got the expected results while passing test data but when i submit the program it got rejected. None of the test cases were met. Could anyone help me in finding the glitch and help me learn new things ? Thanks in Advance.

Here is the code


>
 
Ranch Hand
Posts: 954
4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is the problem statement?
 
Yashwanth Yellapragada
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Tushar ! Here is the link to the Problem Statement. Thanks.

https://www.hackerearth.com/problem/algorithm/icpc-team-management/#c39655
 
Marshal
Posts: 79177
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch

We don't hand out complete solutions. You cannot solve problems by writing code. You work out the algorithm on paper and then when you have got it very simple, you can turn it into code.
 
Yashwanth Yellapragada
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Haha..Thanks Campbell. I will work on the algorithm. I will refine my algorithm.
 
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Yashwanth,
I think the question gives to 2 variables to use, that is n and k. K being the total number of students. n being the number of students who are willing to learn from the coach.

From the explanation below the question, in first team, you are to divide 6 member of unequal names into two teams, with their names having the same length. you can use the length of String (length()) StringofLength to help you. In the second team you are to divide 4 member of unequal names into 2 teams, with their names having the same length.

 
Farmers know to never drive a tractor near a honey locust tree. But a tiny ad is okay:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic