2n Queen's question

Problem description Given an n*n chessboard, there are some positions in the chessboard where the queen cannot be placed. Now we need to put n black queens and n white queens into the chessboard, so that any two black queens are not on the same line, column or diagonal, and any two white queens are not on the same line ...

Posted by therealchuckles on Sun, 03 May 2020 21:58:16 -0700

Cookie of Java Web session Technology

Conversational Technology Session: multiple requests and responses in one session One session: the browser sends a request to the server for the first time, and the session is established until one party disconnects Function: share data among multiple requests within the scope of one session Method: Client session Technology: Cookie Sessio ...

Posted by nakkaya on Sun, 03 May 2020 20:03:23 -0700

node review express create project

express installation npm install express -g //Initialize project node init  //Install express npm install express After that, create a new app.js file with the following contents var express = require('express'); var app = express(); app.get('/', function (req, res) { res.send('Hello World!'); }); var server = app.listen(3000, funct ...

Posted by kevdotbadger on Sun, 03 May 2020 16:56:14 -0700

bzoj 4892: [Tjoi2017]dna hash + dichotomy

meaning of the title The Institute of biology at the University of garridon found the gene sequence s that determines whether people like to eat lotus root, and the base sequence with this sequence will show the character that they like to eat lotus root. However, the researchers found that the base sequence s can still show the character of ...

Posted by Trs2988 on Sun, 03 May 2020 14:25:57 -0700

Oracle Starter Four

Last: Oracle Starter Three Learning Video: https://www.bilibili.com/video/BV1tJ411r7EC?p=35 Oracle table connection: internal connection, external connection.The outer connection is divided into left connection and right connection. In a multi-table query, if there is no conditional association between tables, all matching results will be found ...

Posted by dbrimlow on Sun, 03 May 2020 10:12:58 -0700

[LOJ2274][JXOI2017] add binary answer + priority queue

The general idea is: first, bisect the answer x, and check is to scan from left to right. If the current value is less than x, greedily select the rightmost endpoint to add it, and then maintain the interval addition with line tree / tree array, or directly maintain the times of addition with priority queue. Specifically, open two priority qu ...

Posted by PugJr on Sun, 03 May 2020 00:20:12 -0700

Auto scroll screen capture like miui

Project address: android-notes/auto-scroll-capture Introduction: automatic scrolling screenshots like miui I wrote a blog a long time ago, which is totally different from other long screenshots, but it's very hasty. Now I'll rearrange it android long screenshot beta1 miui auto scroll long screenshot effect painting Nest a FrameLayout ...

Posted by Nukeum66 on Sat, 02 May 2020 11:18:26 -0700

[BZOJ2732][HNOI2012] Archery (two points + half plane intersection)

Title: I'm a hyperlink Explanation: This level contains the previous features, which are obviously dichotomous If you draw persimmons randomly, you will have Y1 < = AX2 + B x < = Y2, and x,y1,y2 are all known. Isn't this a straight line about a,b, half plane intersection? The data range is only half plane intersection energy of nlog ...

Posted by micmania1 on Sat, 02 May 2020 11:00:53 -0700

Source code analysis of java.nio.Buffer buffer

1. Schematic diagram of buffer buffer 2. Common variables //Temporary note location variable private int mark = -1; /** * In write mode, position starts from 0 and can be written to capacity-1 all the time. * In read mode, the position is read from a certain location. If you switch from write to read, the position is set to 0. * ...

Posted by Rony on Fri, 01 May 2020 03:09:35 -0700

Binary search set

I often use two points when I brush questions. Although I can write every time I stumble, I haven't made a summary. Today I met again. Let me summarize. In an ordered array, find a number whose value is key and return its subscript. If there is more than one, return any one. If there is no one, return - 1; int bin ...

Posted by Spaceboy on Thu, 30 Apr 2020 20:33:00 -0700