Introduction to maximum flow of network flow (from common algorithm to dinic optimization)
Network flows, which are closely related to linear programming, are a kind of specific flow solution. The theory and application of network flow are developing. And what we are going to talk about today is a common problem in the network flow - the biggest flow problem.
Maximum flow problem, a combinatorial optimization problem, is to discuss h ...
Posted by Backara_Drift on Fri, 03 Jan 2020 11:09:23 -0800
The definition and use of pointer and array in C language
Characteristics of pointer
He's an address in memory
Operation of pointer itself
What the pointer points to is actionable
How the operating system manages memory
Stack space
4M~8m
When entering the function, stack data will be pressed
Heap space
4g size 1g is the operating system
global variable
Memory mapping
You can modify the contents ...
Posted by shamuraq on Fri, 03 Jan 2020 01:31:48 -0800
Many output methods of Hello World
I. C language
1. Direct output
printf(), puts() output directly
#include<stdio.h>
int main()
{
printf("Hello World!\n");
puts("Hello World!");
return 0;
}
Put() string splicing output
#include<stdio.h>
int main()
{
puts("Hello"" ""World""!");
return 0;
}
2. Output single characters one by ...
Posted by feri_soft on Thu, 02 Jan 2020 19:56:44 -0800
Children learn data structure (12): bubble sorting
When we are learning C language, we have learned bubble sorting. Please refer to "children learn C language (26): bubble sorting": https://www.jianshu.com/p/587ff823ba5b
Chapter 9 of datastructure of Dahua talks about an optimized bubble sorting. The complete code is as follows:
#include<iostream>
using namespace st ...
Posted by Frag on Thu, 02 Jan 2020 09:09:28 -0800
Analysis of C language examples
Turbo C 2.0 is used as the compiling environment in the essence of C language case analysis. However, this compiler has a long history. Newer compilers don't support some examples in the book well. When learning, they take notes at the same time.
Example 18: convert an unsigned integer to any d-BASE (d is between 2 and 16).
Main idea: to find t ...
Posted by maGGot_H on Wed, 01 Jan 2020 08:04:06 -0800
C Language Notes 13_Sorting Algorithm
Sorting algorithm
Bubble sort
Bubble Sort is a simple sorting algorithm.It repeatedly visits the columns to be sorted, comparing two elements at a time, and swapping them if their order (for example, from large to small, and from A to Z) is wrong.
Process demonstration:
#include <stdio.h>
void bubble_sort(int arr[], int len) {
int i, ...
Posted by Warptweet on Sun, 29 Dec 2019 22:45:44 -0800
Path weight of JSK-243 triangle [dynamic planning]
Path weight of triangle
A number triangle is shown. Please make a program to calculate a path from the top to the bottom, so that the total number of the path is the largest.
Each step can go down along the left diagonal or the right diagonal
1 < number of triangle lines < 25
Numbers in triangles are integers < ...
Posted by rs_nayr on Sun, 29 Dec 2019 09:13:14 -0800
The analysis of c-unsigned: 1's place domain
1. Recall the structure first
We all know that a structure can be defined in this way:
struct Point {
float x;
float y;
} point; //Equivalent to: struct Point point;
In addition, if you don't want to declare a structure and just want to define it, you can do the following:
struct {
float x;
...
Posted by brauchi on Sun, 29 Dec 2019 06:40:07 -0800
C Language Notes 12_Variable Parameters-Memory Management-Command Line Parameters
Variable parameters
Sometimes, you may encounter situations where you want a function to have a variable number of parameters instead of a predefined number of parameters.The C language provides a solution to this situation by allowing you to define a function that accepts a variable number of parameters depending on your specific needs.The fol ...
Posted by dannel77 on Fri, 27 Dec 2019 17:43:15 -0800
Kafka Golang client introduction
At present, there are several commonly used Golang Kafka clients, each of which has its own advantages and disadvantages
Client name
Advantages and disadvantages
sarama
The number of users is relatively large, but it is relatively difficult to use, with better performance
confluent-kafka-go
The encapsulation of Kafka in C language has st ...
Posted by Stressed on Wed, 25 Dec 2019 21:56:55 -0800