Snake game (c + + implementation)

It is recommended to copy the code and run it again to see the idea!!! Easy to understand, please read it carefully. It is worth noting that the code I give does not add walls. If necessary, add it yourself. No difficulty design, ibid. Map size (the wall is designed here, which is not implemented in the code) Set an intege ...

Added by kungfu71186 on Sat, 18 Dec 2021 18:12:45 +0200

Dynamic programming of C + + algorithm

Simple dynamic programming Explanation: dynamic programming (DP) is effective in finding the optimal solutions of many overlapping subproblems. It recombines the problems into subproblems. In order to avoid solving these subproblems many times, their results are gradually calculated and saved, from the simple problem to the whole problem. Dyna ...

Added by DoomyCheese on Sat, 18 Dec 2021 15:54:42 +0200

[solution] [AcWing] 1601. Online map

1601. Online map Original question transmission: AcWing 1601. Online map Enter our current location and destination, and the online map can recommend some routes. Now your job is to recommend two routes to users: one is the shortest route and the other is the fastest route. Ensure that there is at least one route between the two places for ...

Added by jlp09550 on Sat, 18 Dec 2021 11:40:20 +0200

Using C + + to implement an employee management system

1, Problem description The employee management system can be used to manage the information of all employees in the company This paper mainly uses C + + to realize an employee management system based on polymorphism. The employees in the company are divided into three categories: ordinary employees, managers and bosses. When displaying inform ...

Added by erikjan on Sat, 18 Dec 2021 09:23:06 +0200

ccf exercise-10 Maya calendar

[problem description] During his academic vacation, Professor M.A. Ya made an amazing discovery on the ancient Maya calendar. From an old and tricky message, the professor found that Maya civilization takes 365 days as a year, called Haab, and contains 19 months. The first 18 months have 20 days each month. The names of the months are pop, no, ...

Added by xtian on Sat, 18 Dec 2021 09:16:11 +0200

Nearest Beautiful Number (easy version) (hard version)

Portal Solution: Look directly at the hard version. I feel that easy is not very different from the hard version. To get the minimum k-beautiful number, it can be divided into the following two cases. First of all, if K is greater than or equal to the number of different bits after n is converted into a string, then directly output this n. t ...

Added by Goop3630 on Sat, 18 Dec 2021 06:22:31 +0200

The three most classic containers in C + + are Vector, Map and List

There are many kinds of containers in C + +. The common ones are sequential containers: vector, deque and list. There are also associated containers: set, multiset, map and multimap. There are too many containers. Let's talk about the three most commonly used containers: vector, list and map. First: Vector container Sketch Map: characteris ...

Added by j0hn_ on Sat, 18 Dec 2021 05:23:23 +0200

[c++] Opencv Mat class details

1. Mat class common member functions and member variables Because Mat class is widely used and has many forms, only the more commonly used member functions and member variables are sorted out here. 1.1 Constructor (1) Default constructor cv::Mat::Mat() Default constructor: Generate a matrix and allocate storage using functions provided by ...

Added by Static_Nexus on Sat, 18 Dec 2021 02:22:18 +0200

Introduction to video and audio data processing: color space -- ffmpeg

summary This article briefly describes the color space conversion of libswscale based on FFmpeg; Libswscale realizes the conversion of various image pixel formats, such as the conversion between YUV and RGB; Here is a brief introduction to the use of libswscale's color space conversion. technological process Related processes Libswscale is ...

Added by SGTWhitelaw on Sat, 18 Dec 2021 00:05:21 +0200

Explore the way to get the encoding of txt files without bom header when they are opened

1, Test environment System: WIN10 Professional Edition Language: Simplified Chinese Operating system default code: 936(ANSI/GBK) The default code of txt text file created by the computer: UTF-8 without bom header by default 2, Question raised When opening a txt text file, there are encoding methods on the right side of the status bar bel ...

Added by Raphael diSanto on Fri, 17 Dec 2021 23:44:41 +0200