SDNU_ACM_ICPC_2022_Winter_Practice_4th [individual]
A
A - A Funny Game
Meaning: n coins form a circle. Each round can take away one or two adjacent coins. Finally, the player who takes all the coins wins. Alice took the lead and asked who would win.
Idea: when n < = 2, Alice can take it all at once, and Alice will win; When n > = 3, no matter Alice takes 1 or 2 coins, Bob can take the c ...
Posted by travelkind on Mon, 14 Feb 2022 16:56:17 +0100
[49] Python full stack -- template rendering
1. Label
{% tag%}
1.1 for loop label
<ul>
<!-- Iteratable objects can use loops -->
<!-- Loop list -->
{% for foo in hobby %}
<li>{{ foo }}</li>
{% empty %} <!-- Displayed when the data of the loop is empty or there is no such variable empty The following -->
<h1>Not ...
Posted by xx_princess_xx on Mon, 14 Feb 2022 16:48:45 +0100
Python Basics
1. Chain assignment
x=y=123 #Equivalent to x=123;y=123
2. Series unpacking assignment
a,b,c=4,5,6 #Equivalent to a=4;b=5;c=6
Using series unpacking assignment to realize variable exchange
a,b=1,2
a,b=b,a #a. The values of b are interchangeable
print(a,b)
result:
a=2;b=1
3. Constant
python does not support constants. The val ...
Posted by Horizon88 on Mon, 14 Feb 2022 16:44:37 +0100
[HCIE TAC] question 5-2
Error point restore: #AR30: acl 2000 rule 5 deny 10.5.1.32 0 int g0/0/0 traffic-filter outbound acl 2000
1, Fault root cause judgment The loopback 0 of AR32 cannot access the loopback 0 and g0/0/0 interface addresses of AR34. The root cause is that the traffic filtering strategy for the address of AR32loopback 0 interface is made in the outg ...
Posted by Transmission94 on Mon, 14 Feb 2022 16:34:30 +0100
Reflection mechanism of Java Foundation
preface
Recently, when learning AOP of Spring framework, I want to know about dynamic proxy first. Other blogs say that the idea of dynamic proxy is related to Java reflection mechanism. Based on the principle of finding other blogs to save time, I am more and more confused, because Java reflection mechanism is very important and urgent ...
Posted by Paavero on Mon, 14 Feb 2022 16:30:28 +0100
How to install and configure NTP server and client on Linux?
preface
NTP time synchronization is a time synchronization network technology.
There are many kinds of time synchronization technologies, each of which has its own characteristics, and there are great differences in the time synchronization accuracy of different technologies.
1, Chrony
1. Brief description
Note that NTP is a netwo ...
Posted by marty on Mon, 14 Feb 2022 16:01:15 +0100
awk report generator for Linux text processing three swordsmen
awk report generator for Linux text processing three swordsmen
1, awk
1. General
Origin: born in Bell Labs in the 1970s, CentOS 7 now uses gawk AWK is named because it took three founders Alfred Aho, Peter weinberger, And Brian Kernighan's Family Name.
Overview: AWK is a language for processing text files and a powerful text analysis tool. ...
Posted by Nukedesign on Mon, 14 Feb 2022 15:57:20 +0100
SwiftUI dynamically modifies iOS status bar style
. 1. Set the style of Status in the item setting options page.
-Click item -Click the application to be set -Set the style of Status
**Status Bar Style: * * Status Bar Style -* * Default: * * the Default style is based on the currently applied color mode. Dark Model displays white status bar and Light Model displays black status bar -* * Dar ...
Posted by ktstowell on Mon, 14 Feb 2022 15:42:32 +0100
C/C + + memo: file operation (reading and writing files)
File operation
The data generated when the program runs belongs to temporary data. Once the program runs, it will be releasedData can be persisted through filesFile operations in C + + need to include header files < fstream >
There are two types of files:
Text file - the file is stored in the computer as ASCII code of textBinary files ...
Posted by JohnResig on Mon, 14 Feb 2022 15:31:21 +0100
Python Basics (values, variables, operators)
Python Basics (values, variables, operators)
pycharm operation
Run: ctrl + f10
Run the current file: ctrl +shift + f10
1, Output functions in Python
print() function
You can output numbersCan be a stringThe output can be an expression containing an operator
The print() function can output the content to the destination
monitor file #O ...
Posted by ben2005 on Mon, 14 Feb 2022 15:08:49 +0100