String matching Pabinkarp

Title: Judge whether the string s contains the string p. The input takes up two lines: String s and string p. The output contains the starting subscript of string p in string s. if there are multiple matches, all of them will be output, and each output will occupy one line. Case: Input: ABABABA ABA Output: 0 2 4 Preliminarily explore t ...

Posted by defect on Thu, 10 Feb 2022 06:11:37 +0100

Fledgling Xiao Li's 102nd blog talk about function pointers

Function pointer digression A function is a function A pointer is a pointer Pointer function is a function Function pointers are pointers The essence of function pointer The essence of function pointer is pointer, the essence of pointer is address, and the object pointed to by function pointer is a function. The function pointer is generally ...

Posted by SsirhC on Thu, 10 Feb 2022 00:38:29 +0100

Dynamic programming (knapsack problem)

A - upper step 2 Xiaogua wants to go up a total of N steps. Due to the special leg length of xiaogua, he can only go up 1 or 3 or 5 steps at a time. Xiaogua wants to know how many ways he can get up these n steps. Can you help him? Input An integer n (n < = 100000) in a row indicates that there are n steps in total. Output An integer i ...

Posted by cupboy on Wed, 09 Feb 2022 16:34:44 +0100

Introduction to C + +

Content outline of this meeting: What is C + +?   C language is a structured and modular language, which is suitable for dealing with small-scale programs. C language is not suitable for complex problems and large-scale programs that require a high degree of abstraction and modeling. In order to solve the software crisis, in the 1 ...

Posted by noginn on Wed, 09 Feb 2022 13:50:57 +0100

Development and growth path (18) -- back end of DIY management system in sophomore year

preface Originally, I thought this project was very incompetent. After all, I didn't pass the stress test in the end. I dare not submit my resume even when I submit it. But after communicating with the counselor yesterday, what's embarrassing? Even if I'm working on a project now, it's difficult to meet people's expectations. But what ...

Posted by Brown on Wed, 09 Feb 2022 11:29:41 +0100

Qt Road 2 -- signal and slot

Signal slot is one of the mechanisms that Qt framework is proud of. Skillfully use and understand the signal slot, and be able to design a very beautiful decoupling program, which is conducive to enhancing our technical design ability. The so-called signal slot is actually the observer mode. When an event occurs, for example, a button detects ...

Posted by TweetyPie on Wed, 09 Feb 2022 11:24:17 +0100

C++ Primer Plus programming exercise 3

1. Write a small program that requires users to use an integer to indicate their height (in inches), and then convert the height into feet and inches. The program uses underscore characters to indicate the input position. In addition, a const symbolic constant is used to represent the conversion factor. #include "iostream" using namespace std; ...

Posted by ashii on Wed, 09 Feb 2022 04:47:10 +0100

NOI 1805: shredder DFS depth first search / map record answer / string to int

subject Origin link describe You are now in charge of designing a new paper shredder. The general shredder cuts the paper into small pieces and becomes difficult to read. The new shredder you designed has the following characteristics: 1. Before each cutting, a target number of shredders should be given first, and a number should also be in ...

Posted by CoderGoblin on Wed, 09 Feb 2022 04:20:52 +0100

Four ways to get data from a foem form: (you can receive data submitted by post and get)

In our daily work or browsing the web, we often use and see many functions and styles of form submission. This function is realized by form form and some JavaScript or jQuery. Now let's use Visual Studio 2015 to verify it. There are four methods to obtain data from form. 1. Receive the data submitted by the form through formal parameters. 2. ...

Posted by mallard on Wed, 09 Feb 2022 01:55:25 +0100

[C++] Hash_map implementation principle and source code [hash table] [hash mapping] [universal data support] [STL]

Hash_map As a nonlinear data structure Before reading, you need to make sure you really understand what a pointer is And without looking at any source code, the linked list data structure is realized through the principle If unsure, the following articles are recommended: Principle of [C/C + +] pointer and its application and understanding (inc ...

Posted by driver on Wed, 09 Feb 2022 01:52:19 +0100