[Ans] If you are drinking "whole milk," you’re consuming a beverage with roughly what fat content?

[Ans] If you are drinking “whole milk,” you’re consuming a beverage with roughly what fat content? Whole milk isn’t made wholly of fat, or largely of fat, or even substantially of fat. In fact, it doesn’t contain much fat all. Whole milk is actually only about 3.5 percent fat, and it’s the closest to the … Read more

[Solution] Hard Cut solution codeforces

Hard Cut solution codeforces – You are given a binary string 𝑠s. You have to cut it into any number of non-intersecting substrings, so that the sum of binary integers denoted by these substrings is a power of 2. Each element of 𝑠s should be in exactly one substring. [Solution] Hard Cut solution codeforces Each test contains … Read more

[Solution] Diverse Segments solution codeforces

Diverse Segments solution codeforces – You are given an array 𝑎a of 𝑛n integers. Also you are given 𝑚m subsegments of that array. The left and the right endpoints of the 𝑗j-th segment are 𝑙𝑗lj and 𝑟𝑗rj respectively. [Solution] Diverse Segments solution codeforces You are allowed to make no more than one operation. In that operation you choose any subsegment of the array 𝑎a and replace each value on … Read more

[Solution] MEX vs DIFF solution codeforces

MEX vs DIFF solution codeforces – You are given an array 𝑎a of 𝑛n non-negative integers. In one operation you can change any number in the array to any other non-negative integer. [Solution] MEX vs DIFF solution codeforces Let’s define the cost of the array as DIFF(𝑎)−MEX(𝑎)DIFF⁡(a)−MEX⁡(a), where MEXMEX of a set of non-negative integers is the smallest non-negative integer not present in … Read more

[Solution] Traps solution codeforces

Traps solution codeforces – There are 𝑛n traps numbered from 11 to 𝑛n. You will go through them one by one in order. The 𝑖i-th trap deals 𝑎𝑖ai base damage to you. [Solution] Traps solution codeforces Instead of going through a trap, you can jump it over. You can jump over no more than 𝑘k traps. If you jump over a trap, it does … Read more

[Solution] Column Swapping solution codeforces

Column Swapping solution codeforces – You are given a grid with 𝑛n rows and 𝑚m columns, where each cell has a positive integer written on it. Let’s call a grid good, if in each row the sequence of numbers is sorted in a non-decreasing order. It means, that for each 1≤𝑖≤𝑛1≤i≤n and 2≤𝑗≤𝑚2≤j≤m the following holds: 𝑎𝑖,𝑗≥𝑎𝑖,𝑗−1ai,j≥ai,j−1. [Solution] Column Swapping solution codeforces You have … Read more

[Solution] Z mod X = C solution codeforces

Z mod X = C solution codeforces – You are given three positive integers 𝑎a, 𝑏b, 𝑐c (𝑎<𝑏<𝑐a<b<c). [Solution] Z mod X = C solution codeforces You have to find three positive integers 𝑥x, 𝑦y, 𝑧z such that: 𝑥mod𝑦=𝑎,xmody=a, 𝑦mod𝑧=𝑏,ymodz=b, 𝑧mod𝑥=𝑐.zmodx=c. Here 𝑝mod𝑞pmodq denotes the remainder from dividing 𝑝p by 𝑞q. It is possible to show that for such constraints the answer always exists. Input The input … Read more

[Solution] Digit Minimization solution codeforces

Digit Minimization solution codeforces – There is an integer 𝑛n without zeros in its decimal representation. Alice and Bob are playing a game with this integer. Alice starts first. They play the game in turns. [Solution] Digit Minimization solution codeforces On her turn, Alice must swap any two digits of the integer that are on different positions. Bob on … Read more

[Ans] Which author is credited with writing the first detective story?

Which author is credited with writing the first detective story? – Edgar Allan Poe is credited with writing the first detective story and is most renowned for his horror stories, but he is also credited with creating the first detective story. Poe’s story “The Murders in the Rue Morgue,” first published in 1841, follows main … Read more