Codeforces 1201D - Treasure Hunting Codeforces Round #577 (Div. 2)

On-line problem solving is relatively small, and I have been studying it for half a day, hoping that it will be helpful to people who are looking for solutions. Topic link: https://codeforc.es/contest/1201/problem/D Topic: Give you a rectangle with a starting point at (1,1). If you have treasures in a given coordinate, you need to take all th ...

Posted by JonathanReinink on Sun, 06 Oct 2019 15:25:37 -0700

On the Idea of Dividing and Consolidating

Merge sort If you want to understand the idea of merging, you can not do without the understanding of merging and sorting. When you look at other people's code, you can't understand it. Comparing two arrays at a time, notice that it can be two different intervals of an array, and store smaller numbers in a temporary array at a time, thus comple ...

Posted by visualAd on Sun, 06 Oct 2019 15:09:04 -0700

Offer 59: Print binary trees in zigzag order: [[1], [3,2], [4,5,6,7]]

1 Topic Description Please realize a function to print the two fork tree according to the zig zag pattern, that is, the first row is printed in the order from left to right, the second layer is printed in the right to left order, and the third line is printed in the order from left to right. 2 Thoughts and Methods Given a binary tree sty ...

Posted by mikesta707 on Sun, 06 Oct 2019 15:06:14 -0700

Introduction to Audio and Video-05-RGB-TO-BMP Using Open Source Library

Directory of Audio and Video Introduction Articles RGB-TO-BMP Review Convert RGB data into BMP images: Understanding BMP file format Preparing BMP header information Prepare BMP header BMP stores RG B in B-G-R order In the biHeight field of BitmapInfoHeader, biHeight is positive, bitmap is scanned from bottom to top, biHeight is negative, a ...

Posted by duke on Sun, 06 Oct 2019 13:20:52 -0700

Introduction to CMake-02-HelloWorld Extension

work environment System: macOS Mojave 10.14.6 CMake: Version 3.15.0-rc4 Hello,World! Extension - The same directory, multiple source files (1) Create a new hello directory, create files CMakeLists.txt, main.cpp, MathFunctions.h, MathFunctions.cpp $ mkdir hello $ cd hello $ touch CMakeLists.txt main.cpp MathFunctions.h MathFunctions.cpp $ ll - ...

Posted by thinfile on Sat, 05 Oct 2019 09:26:12 -0700

Day2 training for National Day

T1 Continuous Storm subject [Title Description] Given M colours of beads, the number of beads in each colour is unlimited. These beads are made into a necklace of length N. Ask how many non-repetitive necklaces you can make. The two necklaces are the same, if and only if the two necklaces can be overlapped by rotation or turnover, and the ...

Posted by keyurjbhatt on Sat, 05 Oct 2019 08:54:02 -0700

Offer 27: Print out all the permutations of the characters in the string in dictionary order

1 Topic Description Enter a string and print out all the permutations of the characters in the string in dictionary order. For example, if you input the string a B c, you print out all the strings abc, a C b, bac, B C a, cab and cba that can be arranged by the characters a, b, C. Input Description: Enter a string of no more than 9 lengths ...

Posted by kasitzboym on Sat, 05 Oct 2019 02:13:15 -0700

Offer 31: the number of occurrences of 1 in integers (from 1 to 1 in n integers)

1 Topic Description Find out the number of occurrences of 1 in integers 1-13 and the number of occurrences of 1 in integers 100-1300. For this reason, he counted the numbers 1, 10, 11, 12, 13 contained in 1 to 13, so there were six times, but he had no problem with the latter. ACMer wants you to help him and make the problem more general, so ...

Posted by MastahUK on Sat, 05 Oct 2019 01:04:19 -0700

Day4 training for National Day

T1 A Theme of Numberism subject [Title Description] LYK has an undirected graph G={V,E}, which consists of n points and m edges. And this is a weighted graph with only a point weight. LYK wants to delete this graph, and its method is like this. Choose one point at a time and delete it, but delete it at a cost. Suppose that the points conne ...

Posted by jimrains on Fri, 04 Oct 2019 18:38:30 -0700

Changle national day training Day1

T1 statistics subject [Title Description] Let S(N) denote the sum of the digits of N, such as S(484) = 4+8+4 = 16, S(22) = 2+2 = 4. If a positive integer satisfies S(x*x) = S(x) *S(x), we call it Rabbit N umber. For example, 22 is a Rabbit N umber because S(484) = S(22) *S(22). Now, give an interval [L, R], and find the number of Rabbit N ...

Posted by zrueda on Thu, 03 Oct 2019 18:02:39 -0700