Luogu P1886 Sliding Window (Monotone Queue)

Um...   Topic link: https://www.luogu.org/problem/P1886   Firstly, this problem is a typical template problem for standard monotonic queues (some people say monotonic queues can only solve this problem). This problem can be handwritten in a queue, or can be used in STL double-ended queue. Core idea: If a person is stronger and smaller than ...

Posted by nade93 on Fri, 11 Oct 2019 12:06:39 -0700

Queen P1219 of Luogu (dfs + retrospective method)

https://www.luogu.org/problem/P1219 Topic: Each row, each column and only one, each diagonal line (including all parallel lines of two principal diagonals) has at most one chess piece and outputs the first three schemes of all schemes. In each scenario, the search starts from the first line, one line by one line, the abscissa will not repeat, ...

Posted by kritro on Fri, 11 Oct 2019 11:32:02 -0700

How the kernel calls the driver entry function in linux character device driver

/* How does the kernel call the driver entry function?*//*Answer: use the module init() function.The module_init() function defines a structure in which there is a function pointer.Point to the driver entry function first_drv_init(), when we load or install a driver,The kernel automatically finds such a structure and then calls the function poi ...

Posted by haolan on Fri, 11 Oct 2019 09:55:20 -0700

[Recording a Problem] Solves the problem of compiling asm.S of libtask under ndk in a useless way.

As mentioned yesterday, asm.S in libtask uses 32-bit syntax of ARM, so it can not be compiled and passed under ARM 64. So I checked the data and rewrote the assembly code so that it can be compiled and passed under 64 bits. Source code is as follows #if defined(__linux__) && defined(__arm__) .globl getmcontext getmcontext: str r1, [ ...

Posted by vividona on Fri, 11 Oct 2019 09:50:02 -0700

Gcd HDU - 6545 (basic number theory)

wls has an integer n, he wants to divide the N numbers of 1_n into two groups, each group has at least one number, and make the sum of the two groups of numbers the largest common divisor, please output the largest common divisor. Input Enter an integer n in a row. 2 ≤ n ≤ 1, 000, 000, 000 Output Output a line and an integer to represent the an ...

Posted by smoothrider on Fri, 11 Oct 2019 09:31:40 -0700

Learning Linear Basis

Reference Blog: https://blog.csdn.net/a_forever_dream/article/details/83654397 https://ouuan.github.io/%E7%BA%BF%E6%80%A7%E5%9F%BA%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0/ https://blog.sengxian.com/algorithms/linear-basis     Linear basis properties: 1. Any number in the original sequence can be obtained by some number exclusion in the line ...

Posted by billli on Fri, 11 Oct 2019 09:07:30 -0700

Create a Vue single page application through Laravel

The article was forwarded from the professional Laravel developer community, the original link: https://learnku.com/laravel/t... We are The third part Instead of building a real client, we learn to use Vue routing to get component data. Now we are ready to turn our attention to the ability to create CRUD s for users - this tutorial will focus ...

Posted by Jenk on Fri, 11 Oct 2019 02:08:19 -0700

Django lazy loading and LazyObject

Looking at the login middleware, I found that request.user returned a SimpleOject object. Looking down, I turned to LazyObject. I didn't understand the source code for half a day. After searching a lot of information on the Internet to find out what functions lazy loading implements, and then looking back at the source code, we may know the pr ...

Posted by Gwayn on Thu, 10 Oct 2019 15:35:49 -0700

SP1716 GSS3 - Can you answer these queries III

meaning of the title Given n n n numbers, q operations, two operations: change ax to y, find the maximum subsection sum of [l,r]. n,m<=50000,-10000<=ai<=10000 Title Solution The problem of interval is to use segment tree to maintain and consider how to merge intervals. When we find the maximum subsection sum between two blocks, th ...

Posted by allspiritseve on Thu, 10 Oct 2019 14:59:51 -0700

PAT Basic 1031 Identification Card (15 points)

A legitimate ID card number consists of 17-digit area, date number, sequence number and 1-digit check code. The calculation rules of the check codes are as follows: Firstly, the weighted sum of the first 17 digits is allocated as {7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2}; then the value Z is obtained by modularizing the calculated ...

Posted by Ward on Thu, 10 Oct 2019 14:00:33 -0700