Given n items with size A[i] (i from 0 to n – 1), an integer m denotes the size of a backpack. How full you can fill this backpack?

https://helloacm.com/algorithms-series-0-1-backpack-dynamic-programming-and-backtracking/

7th-8th of April the community corehard.by are hosting an international weekend conference dedicated to C++ and related technologies - CoreHard Spring 2018.

Speakers from the leading IT companies of Belarus, Russia, Ukraine, Germany and Netherlands will gather to preset their experience in development and testing.

We have prepared for you:

🔹3 streams of presentations on the first day of the conference;

🔹Live-translation of the first day for those who want to join remotely;

🔹3 streams of workshops on the second day of the conference;

🔹Lunch and coffee breaks for informal networking with the speakers;

🔹Souvenirs from the organizers and partners.

Full program and tickets you will find on the official website of the conference: http://conference.corehard.by/

P.S. Join us on the Telegram to discuss C++ and related "hardcore" topics: https://t.me/corehard_by

Let's start the party! ;)

Weeks of programming can save you hours of planning :D

➡️ goo.gl/JL7Va5

Limited number available

Converting caffeine into code t-shirt & hoodie :D

>> https://goo.gl/VR1oL4 <<

Available in the next 24 hours

A point is chosen randomly in a square. 4 lines are drawn to connect this point with the 4 vertices of this square, such that 4 triangles are formed. Find the probability that all interior angles of the 4 triangles are less than 120°. Give your answer correct to the nearest 3 decimal places.

https://helloacm.com/monte-carlo-solution-for-mathematics-x-programming-competition-7/

Given scores of N athletes, find their relative ranks and the people with the top three highest scores, who will be awarded medals: “Gold Medal”, “Silver Medal” and “Bronze Medal”.

Example 1:

Input: [5, 4, 3, 2, 1]

Output: [“Gold Medal”, “Silver Medal”, “Bronze Medal”, “4”, “5”]

Explanation: The first three athletes got the top three highest scores, so they got “Gold Medal”, “Silver Medal” and “Bronze Medal”.

For the left two athletes, you just need to output their relative ranks according to their scores.

Note:

N is a positive integer and won’t exceed 10,000.

All the scores of athletes are guaranteed to be unique.

class Solution {

public:

vector

// TODO

}

};

https://helloacm.com/c-coding-exercise-use-hashtablepriority-queue-to-compute-the-relative-ranks/

Amaze your friends with this free .Net poster!!

https://www.microsoft.com/net/images/dotNET_poster.pdf

Given a List of words, return the words that can be typed using letters of alphabet on only one row's of American keyboard like the image below.

// TODO:

vector

}

Example 1:

Input: ["Hello", "Alaska", "Dad", "Peace"]

Output: ["Alaska", "Dad"]

https://helloacm.com/words-typed-in-one-rows-american-keyboard/

Installing Visual Studio 2017, which supports the C++ for Linux Compilation!

Given an array of numbers (for simplicity, we use integers), find the maximum value of abs(max left – max right) where we separate the array into two.

https://helloacm.com/an-interview-question-on-algorithm-to-find-absmax-left-max-right/

C++ whereis implementation for Windows.

https://helloacm.com/c-whereis-for-windows/

Given an array of integers where 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once.

Find all the elements of [1, n] inclusive that do not appear in this array.

Could you do it without extra space and in O(n) runtime? You may assume the returned list does not count as extra space.

Example:

Input:

[4,3,2,7,8,2,3,1]

Output:

[5,6]

https://helloacm.com/how-to-find-all-numbers-disappeared-in-an-array-cc-coding-exercise/

THERE ARE NO WINNERS HERE: and it is not about the language war!

Have a nice weekend!

https://codingforspeed.com/integer-performance-comparison-for-c-c-delphi/

Why and When should you do a Profiling on Your Application?

https://helloacm.com/why-and-when-should-you-do-a-profiling-on-your-application/

Happy Chinese New Year! It is the Year of Rooster ! Our HR just said that we can take this afternoon off!

PS: I have just set up my 4-th monitor!

PPS: Dont' forget there is Chinese Spring Festival Gala:

https://justyy.com/watch-tv-online/en/chinese-spring-festival-gala-watch-online.php

Model View Controller (MVC) explained in C++ code.

https://helloacm.com/model-view-controller-explained-in-c/

This "Bash Shell" on Windows 10 is truly amazing..

https://helloacm.com/the-ubuntu-sub-system-new-bash-shell-in-windows-10/

How to Use the Dynamic Link Library in C++ Linux (gcc compiler)?

https://helloacm.com/how-to-use-the-dynamic-link-library-in-c-linux-gcc-compiler/

C++11 makes it easy to do asynchronous coding....

Multi-Processes Experiments – When Can Windows Utilize All the Cores? Yesterday I jumped to conclusion too early... It is not 'academically' correct that only multithreading process can utilize multicores..

https://helloacm.com/multi-processes-experiments-when-can-windows-utilize-all-the-cores/

This is the biggest piece of knowledge I 've learned today: "In order to use multiple cores at the same time, multiple threads are required. The inverse is not true! To really take advantage of a multi-core system, an application should split up the main processing into multiple threads as well. Its algorithms need to be parallelized."

http://stackoverflow.com/questions/41642186/how-can-the-os-use-all-cores-for-my-application/41642808#41642808

Throw Often, Catch Rarely.

https://helloacm.com/throw-often-catch-rarely/

Happy New Year 2017! Here are the top-10 most voted posts in 2016.

https://helloacm.com/how-to-list-the-most-voted-posts-in-a-year-using-sql/

How to Capture the Integer-Divide-By-Zero Error in C++?

Merry Christmas and Happy New Year.

https://helloacm.com/how-to-capture-the-integer-divide-by-zero-error-in-c/

Assume a year has 365 days, what is the probability among 50 students, that at least two having the same birthday?

and what is the probability that all only two (exactly two) share the birthday?

https://helloacm.com/what-is-the-probability-of-two-sharing-birthday/

How to Call COM Object in Unmanaged C++? I spent hours on google but apparently there isn't a full working example, therefore, I write one in case somebody needs it.

https://helloacm.com/how-to-call-com-object-from-visual-studio-c/

Refactor this:

double getRes(double height, double res) {

int num = 3;

double next = height / num;

// increase number of cubes if the next resolution is not worse

// than the preferable res

while (next >= res) {

num ++;

next = height / num;

}

return next;

}

https://helloacm.com/code-refactoring-cc-unnecessary-loop-replaced-with-math-expression/

How to Represent and Transpose a Sparse Matrix in C++? This weekend is only half left :(

https://helloacm.com/how-to-represent-and-transpose-a-sparse-matrix-in-c/

How to Link Static Library in C/C++ using GCC compiler? and Weekend is almost over :(

https://helloacm.com/how-to-link-static-library-in-cc-using-gcc-compiler/