Closed Thread
Results 1 to 4 of 4

Thread: Solve my homework (or something)

  1. #1
    vivek is offline Newbie
    Join Date
    Mar 2010
    Posts
    2
    Rep Power
    0

    Solve my homework (or something)

    N large empty boxes (assume they are of type:1) are initially placed on a table. An
    unknown number of boxes (type:1) are selected and in each of them K smaller boxes
    (type:2) are placed. Again an unknown number of type:2 boxes are selected and K boxes of
    type:3 are placed inside. This process is repeated T times. Now a box is assumed to be
    empty when it has no smaller boxes inside it. Finally after all the processes are complete let
    there be Fempty boxes in total.
    LIMITS
    1< N,K,T,F <1000000
    Input
    First line of the input file contains the number of test cases. Then each line contains 4
    integers N,K,T,F as described above.
    Output
    Each line should contain the total number of boxes on the table.
    Example
    Input:
    1
    11 8 2 102
    Output:
    115



    solve it

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    Join Date
    Jul 2006
    Posts
    16,491
    Blog Entries
    75
    Rep Power
    143

    Re: Solve my homework (or something)

    No. It looks far to easy to be worth my time. Perhaps if you post the code you have so far I'll help
    Programming is a branch of mathematics.
    My CodeCall Blog | My Personal Blog

  4. #3
    Moudi's Avatar
    Moudi is offline Programmer
    Join Date
    Jan 2010
    Posts
    166
    Blog Entries
    1
    Rep Power
    9

    Re: Solve my homework (or something)

    Meh i hate those homeworks that you have to think and not accually code D:
    If you show that you're trying someone might accually help

  5. #4
    f03nix is offline Newbie
    Join Date
    Mar 2010
    Posts
    2
    Rep Power
    0

    Re: Solve my homework (or something)

    This question was a part of a college contest the guy was planning to cheat on You had to solve 7 such problems in about 6 hours , the one who solves max wins. ( I know cause i too was in it ... and won )

    I managed to solve this question but the selection process seems to be running T+1 times not T (for the given output to match the given input) :/. I recon the problem setter isn't considering the first time we select out of N as one of the T times of the 'process'.

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Homework Help
    By Jrb in forum C and C++
    Replies: 2
    Last Post: 02-09-2011, 07:22 PM
  2. Need Help with homework!
    By keenbean in forum C and C++
    Replies: 6
    Last Post: 12-15-2009, 07:17 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts