LeetCode: the 160th week of force deduction
LeetCode: problem solving of the 160th weekly match
5238. Finding the positive integer solution of a given equation
subject
In this paper, we give a function f(x, y) and an objective result z. please calculate the equation f(x,y) == z all possible positive integer pairs X and y.
The given function ...
Added by asa_carter on Sun, 27 Oct 2019 07:29:19 +0200
Codeforces 293E point divide and conquer + cdq
Codeforces 293E
Portal: https://codeforces.com/contest/293/problem/E
Title:
Give you a tree with an edge weight of 0 at the beginning, then give you n-1 operations, add edge weight to the edge every time, ask you how many pairs of paths between n-1 operations are less than or equal to l, and the edge weight is less than or equal to w
Explanatio ...
Added by Azkoyen on Sat, 26 Oct 2019 21:00:02 +0300
MQTT message exceeds the maximum message, message size length
In the project, mqtt is contacted by emqtt , when the number of messages is too large, you will be prompted
Disconnected (32109) - java.io.EOFException
at org.eclipse.paho.client.mqttv3.internal.CommsReceiver.run(CommsReceiver.java:181)
at java.util.concurrent.Executors$RunnableAdapter.call(Execut ...
Added by peanutbutter on Sat, 26 Oct 2019 17:33:34 +0300
The most effective algorithm for judging prime number
Catalog
Definition
1. Conventional method judgment
2. The most effective way to judge
3 test
Definition
An integer whose divisor is only 1 and itself is called a prime number, or prime number.
1. Conventional method judgment
According to the definition, since prime numbers have no divisors other than 1 and itself, it is sufficient t ...
Added by iZone on Sat, 26 Oct 2019 00:48:43 +0300
After summarizing 11 items, my understanding of Python decorators
As you know, @ symbol is the syntax sugar of decorator, and the function behind @ symbol is the protagonist of our article: decorator.
The decorator is placed at the beginning of a function definition, and it's like a hat on the function's head. Bind to this function. When we call this function, the first thing is not to execute this function, ...
Added by noppie on Fri, 25 Oct 2019 16:51:17 +0300
Java concurrent programming basics
Concurrent basis
Principles of concurrent programming
Atomicity
Atomicity refers to that in an operation, the cpu can't pause and then schedule in the middle of the process, neither be interrupted by the operation, that is to say, one operation or multiple operations are either all executed and the execution process will not be interrupted b ...
Added by Bladescope on Thu, 24 Oct 2019 21:14:31 +0300
[Java required course] performance comparison of contains method between ArrayList and HashSet (JMH performance test)
1 Introduction
In daily development, ArrayList and HashSet are very common collection classes in Java.
ArrayList is the most commonly used implementation class of List interface.
HashSet is the implementation that holds the unique element Set.
This paper mainly makes a simple discussion on the common method contains(), mainly the performanc ...
Added by CodeEye on Wed, 23 Oct 2019 17:03:08 +0300
How to visualize the dependency of Go Module
This paper First appeared in My blog , if you think it's useful, please like the collection and let more friends see it.
Recently, I developed a very simple tool, the total code is less than 200 lines. Today, briefly introduce it. What tool is this? It is a tool for visualizing Go Module dependencies.
Why development
Why do you want to develop ...
Added by altexis on Wed, 23 Oct 2019 09:06:16 +0300
Comparison and Reflection on the solutions to the silly questions of python
1. topic:
The bonus paid by the enterprise is based on the profit commission. If the profit (I) is less than or equal to 100000 yuan, the bonus can be increased by 10%.
If the profit is higher than RMB 100000 and lower than RMB 200000, the part lower than RMB 100000 will be charged at 10%, and the part higher than RMB 100000 will be charged a ...
Added by Gump on Tue, 22 Oct 2019 20:16:04 +0300
linuxc message queuing
-- see section 15.7 of advanced programming in unix environment for details
At the end of section 15.7 of advanced programming in UNIX environment, the advantages and disadvantages of message queuing are summarized. The conclusion is that they should no longer be used in new applications. Indeed, in pursuit of efficiency, we can use shared memo ...
Added by Ekano on Tue, 22 Oct 2019 18:32:22 +0300