Develop an algorithm

I participated in a programming competition at my University. I solved all the questions except this one. Now I am practicing this question to improve my skills. But I can’t figure out the algorithm. If there is any algorithm existing please update me. Or any similar algorithm is present then please tell me I will change it according to this question.

This is what I want to do.

  • The First line of input is the distance between two points.
  • After that, each subsequent line contains a pair of numbers indicating the length of cable and quantity of that cable. These cables are used to join the two points.
  • Input is terminated by 0 0


  • The output should contain a single integer representing the minimum number of joints possible to build the requested length of cableway. If no solution possible than print “No solution”.

Sample Input

444 16 2 3 2 2 2 30 3 50 10 45 12 8 12 0 0 

Sample Output


How can I encourage a fellow player to develop a character a bit more?

I would like to encourage another player to add a little nuance to his dark and cringey character.
The player in question is young and quite enthusiastic, didn’t derail anything in-game, and I don’t want to impose anything on him.

How can a player motivate another player to develop their character’s personality without being pushy ?

For Context :
We are playing CoS as a group of mostly new players. During session 0, we agreed to run a “good” campaign and to each write a couple paragraphs long backstory.
This player’s character is the daughter of a monk-pirate, who taught her monks’ fighting art. His description of her early life mentioned that “everyone on the ship wanted to fuck her, but she defended herself” and that her father was often angry at her for “damaging” members of his crew.

Since the start of the campaign, he has taken “trophies” (teeth and tongues) from everything we kill to wear as a necklace. A few sessions in, he started to play his character more and more pointlessly mean and confrontational to every NPC we meet. A couple times per session, he separates from the group to do things like steal alcohol from a friendly NPC, or bash in the door of a depressed widow without in-game justification.

At the end of the last session, I talked a bit with him to understand his character’s behavior. He described, with details, how actually his character was treated like “less than an object” by her father and how he and his crew raped and tortured “with nails pulled and stuff” her all her life.

I’m not against a tragic backstory but this maxing-out darkness, rape and drama to end up with a character that is just… mean, seems a bit pointless.

Looking for a fully customisable WP responsive theme to develop a small scale fiverr type site for voice artists [closed]

I’m new here, not totally wet behind the ears but in reality, a beginner. I am looking for a free, fully customisable WP theme to develop a fiverr type site for voice artists but on a much smaller scale. I’m thinking of limiting membership to 3000 to begin, including buyers and talent – if interest is shown.

I will need a lot of help as this is quite a bit to chew off but I’m determined. I just need a good starting point – a theme (I think), unless anyone has any other suggestions. It would need to be able to handle lots of uploading of mp4, mp3, jpeg, png, buying and selling with Paypal, Escrow etc.

Security is of utmost importance.

Anyone have any solid advice on which theme I could use that is user friendly? I am using XAMP.

Thank youin advance for any feedback!

All the best!

Is it a valid or acceptable practice to develop a separate page to meet accessibility requirements?

I recently visited some websites that seems to be using either deprecated technology (e.g. Flash) or contain a lot of complex front end javascript code to create the interaction of the user interface.

Some of these websites provide a link or button that takes you to a accessibility mode page which strips all the unnecessary features and provide just the content that is optimised for screen readers and provide other accessible features (e.g. keyboard navigation).

With accessibility being such a big focus today, and inclusive design slowly being incorporated into many of the standard design systems, is it still seen as an acceptable practice to provide a separate page to meet accessibility guidelines (i.e. WCAG 2.0)? Are there other reasons why this might be a better strategy/option in the current design and development culture?

Can humans of House Tharashk develop the Mark of Finding?

After reading through Eberron: Rising from the Last War, I have noticed a conflicting statement regarding the Mark of Finding. On page 32, Half-Orcs and Dragonmarks, it states:

The Mark of Finding appears among half-orcs of House Tharashk. Strangely, both orcs and humans associated with the house cannot develop this mark.

This directly conflicts with the information found on page 41 which goes into detail about the Mark of Finding:

Alone among the dragonmarks, the Mark of Finding is carried by two races: humans and half­ orcs.


If your half-orc or human character has the Mark of Finding, the following traits replace the character’s racial traits in the Player’s Handbook, aside from age, alignment, size, and speed.

Additionally, there is nothing under the House Tharashk subheading about humans being unable to develop the Mark of Finding. Further, on page 37 under Dragonmarks and their Houses, both humans and half-orcs are listed as being associated with House Tharashk and the Mark of Finding.

Is this some kind of editorial/printing error or is there some piece of lore which allows both of these claims to be true?

develop 1 to 5 fillable PDF forms for 10usd for $10

Hello, I can prepare 1-5 fillable PDF Forms/Documents within 5 hours for only $ 10. I am here to change anything in your PDF & IMAGE documents. I offer for urgent editing on such documents. I am here to work for you. I will modify any type of your document to an editable format. WHAT YOU WILL GET from my side: Fillable PDF FormUnlimited Revisions.Fast Delivery.100% SatisfactionIf you need more than 5 pages PDF Fillable Form design then please contact me I will provide a special offer for your requirements. Thanks Jagadish

by: jneupane
Created: —
Category: Virtual Assistant
Viewed: 231

How to develop for Android with Xamarin?

I want to develop applications for Android in C#. On Windows I tried Xamarin Studio and I was very happy with it. Is there a way to use Xamarin on Ubuntu?

I noticed there are Xamarin.Android binaries for Linux available on the internet, but those are only for Xamarin.Android 9.22, I would love to use Xamarin.Android 10. Can this be done?

Lastly, I know there is no Xamarin Studio for Linux. What IDE can I use instead of it? How do I set it up for building Android apps and deploying them?

How to develop the access control/authorization of a TLS 1.3 based system?

I have developed a TLS 1.3, PKI based communication module with OpenSSL for a SCADA system. I intend to broaden the security of this system by implementing some kind of access control. My goal is to be able to set the privileges to certain features of the system to each individual user separately. These users should authenticate themselves by user name and password.

I was wondering if there is a standardized way of doing this. I have a couple of ideas which might work, but I do not know how, and how well:

  1. Write my own implementation. My guess that this might be safe, because the communication channel is safe by using OpenSSLs TLS 1.3. This way the users names and passwords are going to be sent encrypted, which the server can use for authorization to certain features. Is this safe to do? If this is safe where would the server store the passwords? Database or file or other? How would you provide security for them?
  2. Use TLS-SRP with or without certificate and use the passwords for authorization to certain features. Is this possible with OpenSSL? How?
  3. Use Kerberos. Is this possible with OpenSSL? How?

If you have other idea other than these, please feel free share it with me! I would like to know all my options and the pros and cons of each, to be able to make the best choice.