Tag: algorithm

C# – SoftUni – Natural Order Sequences

Another SoftUni algorithm problem that I have considered interesting is presented here: You are given an integer S. Generate all non-empty sequences of numbers in range [1…S], which have sum of elements ≤ S. Display the sequences in their natural order,

Tagged with: , , ,

C# – SoftUni – Bridges – Greed Algorithm

Some days ago I was checking the algorithm problems for the algorith exam preparation of SoftUni and I have decided to solve one problem. The problem is named “Bridges” (hence the youtube link above) and is a nice example of Greed

Tagged with: , ,

C# – CodeForces – Two TVs

Having two TVs is great. Or it used to be in the 90s. Anyhow, the latest problem in CodeForces that I have resolved was concerning a guy with a schedule of TV shows, which he was planning to watch on his

Tagged with: , ,

Excel VBA – Activity Selection Algorithm

Wikipedia says that the activity selection problem is a combinatorial optimization problem concerning the selection of non-conflicting activities to perform within a given time frame, given a set of activities each marked by a start time (si) and finish time (fi). The problem is to select the maximum

Tagged with: , , ,

C# – CodeForces – Okabe and Future Gadget Laboratory

CodeForces is a nice website for anyone, who likes checking himself vs the top developers worldwide. It’s even separated into divisions, thus, they kindly provide 3 easy questions and 5 hard. Although, I do not know anyone who can call

Tagged with: , ,

Codeforces – Problem 798A – Checking the Calendar

After reviewing the Meller watch, it’s time for some more IT related stuff in the blog.  Thus, I have decided to do what I usually do when I want to write some article and I do not know what to

Tagged with: , ,

C# – Algorithms – Find n-th divisor of an integer

The Codeforces contests are sometimes more challenging than expected, even for the first problems, which are supposed to be trivial. Well, they are not that trivial. In the 762. edition, the 1. problem was concerning the n-th divisor of an

Tagged with: , ,

C# – Algorithms – Arpa’s hard exam and Mehrdad’s naive cheat

As mentioned some times ago, whenever I am looking for a subject to post, the easiest way is to go to Codeforces.com and simply take a problem from the second division. If I manage to solve it from the first

Tagged with:

C# – Algorithms – Parade – CodeForces.com

CodeForces.com is really a nice place you can learn stuff. Learning by doing is probably what man actually needs in programming. Thus, I have taken the 2. Problem of the 2. Division in CodeForces, as far as it seemed interesting

Tagged with: , ,

C# – Algorithms – Bear And Finding Criminals (from CodeForces)

This Wednesday on 18:35 I did not have anything better to do than competing in codeforces.com. I have just finished work at 18:00 and I managed to get home before the start of the competition and even to get a sandwich

Tagged with: ,

C# – Algorithm Solution for Vasya and String

I have not solved algorithm problems in a while and thus, I have decided to take a look at the latest not difficult problems Codeforces.Com. I somehow liked the problem for Vasya And String as far as it seemed quite easy

Tagged with: ,

Python – Dijkstra algorithm for all nodes

In this article I will present the solution of a problem for finding the shortest path on a weighted graph, using the Dijkstra algorithm for all nodes. The problem is formulated by HackBulgaria here. Pretty much, you are given a

Tagged with: , , ,

Python – Times the dice is same as previous or next

  Today, after playing some interesting board games, I was wondering about some probabilities with dice. As far as I did not want to calculate them with statistics methods (and it is always funnier to make a simulation), I have

Tagged with: , , , ,