Have you ever been going home and started devising the shortest path to there? Or something like that? Because I certainly have! I want to know if it's just me or others are like that too.
# | User | Rating |
---|---|---|
1 | tourist | 4009 |
2 | jiangly | 3823 |
3 | Benq | 3738 |
4 | Radewoosh | 3633 |
5 | jqdai0815 | 3620 |
6 | orzdevinwang | 3529 |
7 | ecnerwala | 3446 |
8 | Um_nik | 3396 |
9 | ksun48 | 3390 |
10 | gamegame | 3386 |
# | User | Contrib. |
---|---|---|
1 | cry | 165 |
2 | maomao90 | 164 |
3 | Um_nik | 163 |
4 | atcoder_official | 160 |
4 | adamant | 160 |
6 | -is-this-fft- | 158 |
7 | awoo | 157 |
8 | TheScrasse | 154 |
9 | nor | 153 |
9 | Dominater069 | 153 |
Have you ever been going home and started devising the shortest path to there? Or something like that? Because I certainly have! I want to know if it's just me or others are like that too.
Name |
---|
Guessing age of a girl is a very good application of binary search. To be safe, you can use l = 0 and r = 1e9.
Unfortunately I have been unable to apply this as I dont talk to girls
To be safe, you can use l = 0 and r = 1e9.
Now I know why no girl wants to talk to you
I agree. Girls would walk away if the first sentence you say to them is "are you older than 500000000 years?"
I think some girl could become angry if you will ask if it is "older than 5e8?" Haha
not you don't, you can't
You can do it in O(1)
Just ask if she's > 13
If you're setting r = 1e9, you might as well try Carbon Dating.
That feeling when no girl will go out with you, so you have to resort to getting dinner with an element instead.
"l = 0" sus
We don't discriminate based on age
as american as it gets
bro l = 0...
i'm calling cops
yes
Just yesterday after I gave my friend Vasya his birthday present (a permutation of n positive integers), some aliens tricked me onto their ship. They told me that I had to count the number of multiples of k in the range l-r which contained at most c consecutive digits d in base b, or else they'd destroy everyone. I did. You're welcome.
After releasing me, I met Alice for our weekly game of Nim, played perfectly while sitting on a staircase with ~5 million vertically stacked stones. My neighbor John stopped by to say Good morning and ask how Alice's boyfriend, Bob was doing. He couldn't join our game because Bessie, one of his cows, was leading some sort of Orwellian uprising rivaling the likes of Animal Farm. Thousands of other cows decided to turn his family's farm into a theme park with 10^5 attractions that would cause guests to experience path bitwise xor excitement when traveling between rides.
If I didn't know how to hypnotize them with drawings of Voronoi Diagrams, it could have been a disaster--just imagine the traffic in a tree-shaped park! At the very least, they could have had the courtesy to design it in a Monogon, right? It'd attract just as many tourists, and on days with lots of sun48, they could sell concessions like BurnedChicken, Mike & Ikes, and FizzyDavids.
Yes, binary search, to search a word in a pocket dictionary.
when sharing a watermelon with my friend who's a fan of even numbers.
If you're working on some project that deals with strings, string algorithms and data structures could be useful like Trie for example. Text editors are a good example.
If you have a list of bad words and a large CSV file (40 GB) that contains some texts such that every text might have bad words and you want to split this file into two files with bad and good texts, then you can use multithreading to read the file and Trie to split them. This might be useful in social media apps.
Personally, I used BFS once to do some frontend trick.
Me and my fellow coders keep telling "use dijkstra" to ourselves when we dispose of the plates and go to wash our hands in our college cafeteria. Also, we could think of a problem in which one has to find the minimum amount of time taken to go from one location to another in our campus using select paths that are suitable for bicycles, but are of different lengths as compared to the walkways.
Binary search in books
Except in books v[i] = i, so you are not really doing binary search, you are doing some type of approximation search. To be more clear, in books the values of the pages are continuous: 1,2,3,4,5,6,.., unlike in arbitrary arrays in problems.
Books are more like you can send a query to the judge but it will return something falling approximately in the neighborhood of your query.
Yes, I can determine the user's gender if it is a Boy or a Girl (if there is no name).
I always ask myself -is-this-fft-?
Some random person gave me a pair of integers for my birthday and threatened to delete my contribution if I couldn't solve 1853B - Fibonaccharsis in real life :(
What is a tree's favourite drink?
root beer
What is tree's favourite maths topic in school?
Geometree
I use binary search daily to determine the timestamp where I left off while watching a web series.