Posts

Showing posts from April, 2021

CodeForces Problem: A. Beautiful Matrix with Java [Codeforces Round #161 (Div. 2)]

Image
  A. Beautiful Matrix Problem: You've got a 5 × 5 matrix, consisting of 24 zeroes and a single number one. Let's index the matrix rows by numbers from 1 to 5 from top to bottom, let's index the matrix columns by numbers from 1 to 5 from left to right. In one move, you are allowed to apply one of the two following transformations to the matrix:   1. Swap two neighboring matrix rows, that is, rows with indexes i and i + 1 for some integer i (1 ≤ i < 5).  2. Swap two neighboring matrix columns, that is, columns with indexes j and j + 1 for some integer j (1 ≤ j < 5).  You think that a matrix looks beautiful, if the single number one of the matrix is located in its middle (in the cell that is on the intersection of the third row and the third column). Count the minimum number of moves needed to make the matrix beautiful. Input  The input consists of five lines, each line contains five integers: the j-th integer in the i-th line of the input represents the element of the

CodeForces Problem: A. Young Physicist with Java [Codeforces Beta Round #63 (Div. 2)]

Image
  A. Young Physicist Problem: A guy named Vasya attends the final grade of a high school. One day Vasya decided to watch a match of his favorite hockey team. And, as the boy loves hockey very much, even more than physics, he forgot to do the homework. Specifically, he forgot to complete his physics tasks. Next day the teacher got very angry at Vasya and decided to teach him a lesson. He gave the lazy student a seemingly easy task: You are given an idle body in space and the forces that affect it. The body can be considered as a material point with coordinates (0; 0; 0). Vasya had only to answer whether it is in equilibrium. "Piece of cake" — thought Vasya, we need only to check if the sum of all vectors is equal to 0. So, Vasya began to solve the problem. But later it turned out that there can be lots and lots of these forces, and Vasya can not cope without your help. Help him. Write a program that determines whether a body is idle or is moving by the given vectors of forces.

The Production Principle and Characteristics of Bitcoin

Image
Production principle Speaking of the essence of Bitcoin, the essence of Bitcoin is actually a special solution generated by a series of complex algorithms.  A special solution refers to a set of finite solutions that can be obtained from a system of equations. Each specific solution can solve the equation and is unique.  Using the analogy of banknotes, Bitcoin is the serial number of a banknote. If you know the serial number on a banknote, you will own the banknote.  The process of mining is to continuously search for special solutions of the equations through a large number of calculations.  The equation system is only designed with 21 million special solutions, so the upper limit of Bitcoin is 21 million.   Currency characteristics Decentralization: Bitcoin is the first distributed virtual currency. The entire network is composed of users and there is no central bank. Decentralization is the guarantee of Bitcoin's security and freedom. Circulation around the world: Bitcoin can be

Popular posts from this blog

CodeForces Problem: A. Young Physicist with Java [Codeforces Beta Round #63 (Div. 2)]

CodeForces Problem: A. Beautiful Matrix with Java [Codeforces Round #161 (Div. 2)]

Your Everyday’s One Click Make You Rich In Future| Pi Network |