[JSOI] important city

This is wrong. Why? … 1 #include<iostream> 2 #include<cstdio> 3 #include<cstring> 4 #include<algorithm> 5 #include<set> 6 using namespace std; 7 const int maxn=207; 8 int n,m,ans; 9 int map[maxn][maxn]; 10 set<int>node[maxn][maxn]; 11 int a[maxn],top; 12 bool vis[maxn]; 13 int main(){ 14 memset(map,0x3f3f3f3f,sizeof(map)); 15 cin>>n>>m; 16 for(int i=1;i<=m;i++){ 17 int u,v,w;cin>>u>>v>>w; 18 map[u][v]=map[v][u]=w; 19 } 20 for(int k=1;k<=n;k++){ 21 for(int i=1;i&...

Dictionary operation process

'''Data type partition; variable data type / immutable data typeImmutable: yuan, bool, int STR hashVariable: list, dict set can not hash.dict key Must be immutable data type. value Arbitrary data typedict Advantages: two points lookup Storing large amounts of data Characteristics: disorder.'''# dic = {"name":["erge", "suiyue", "tiantian"],# "py9" :[{'num':71, "age":18}],# True:1,# (1,2,3):"wuyiyi",# 2:"erge"# }# print(dic)## dic1= {"age":18, "name":"jin","sex":"male"}# print(dic1)# #add only two# dic1["high"] = 185 #no is add# dic1["age"] = 16 ...

About jQuery checkbox

About checkbox: $("#checkall").click(function () {      // this Fully selected check boxVar userids = this.checked;If (this.checked = = false) {$("input[name=cheCkbtn] "".Each (function () {")This.checked = userids;//do something       })}Else {/ / get the check box of name=checkbtn to traverse the output check box.$("input[name=checkbtn]").EaCH (function () {//do somethingThis.checked = userids;};}});About monitoring checkbox status change events:I've tried some online writing, such as change events, bind click events and so on, but in the input add onclick events, through on...

Garbage collection

If a Web application runs in a garbage collection environment such as JVM, garbage collection can have a huge impact on system performance. Understanding garbage collection mechanism helps program optimization and parameter tuning, as well as writing memory safe code. Take JVM as an example, its memory can be mainly divided intoHeap (heap)andStack (stack)。 The stack is used to store thread context information, such as method parameters, local variables, etc. Heap is the memory space for storing objects, and the creation and release of objects and garbage collection are carried out her...

JSP

1. Introduction   JSP(Java Server Page )It is a dynamic webpage programming technology provided by SUN, and is a dynamic resource of Java Web server side.   JSPTechnology can provide:     ·htmlStatic page     ·Allow Java code to be nested in the page to provide dynamic data.     ·Easy to Typesetting data.          When the Jsp is first accessed, the Jsp engine translates the Jsp into a servlet, which is stored in the work directory in Tomcat.   Two. Basic grammar   1、Notes     Display annotations (allowing clients to see):...

SpringBoot configures global custom exceptions

Unlike Springmvc global exceptions in traditional collections, see the previous section, https://www.cnblogs.com/zwdx/p/8963311.html For the springboot framework, I will introduce one of them. 1、ExceptionHandlerAdvice import javax.servlet.http.HttpServletResponse; import org.springframework.web.bind.annotation.ControllerAdvice; import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.bind.annotation.ResponseBody; /** * Handling exception information*@author wdh * */ @ControllerAdvice @ResponseBody public class ExceptionHandlerAdvice extends MyEx...

Use JavaScript to print the number of Narcissus.

<!DOCTYPE html> <html> <head> <meta charset=”utf-8″ /> <title></title> <script> //Print narcissus number var g, s, b; for (var i = 100; i <= 999; i++) { g = i % 10; s = parseInt(i / 10) % 10; b = parseInt(i / 100); if (g * g * g + s * s * s + b * b * b == i) { console.log(i); } } </script> </head> <body> </body> </html>

AD conversion

The input analog signal is continuous in time and the output digital signal code is discrete. When the AD converter is converted, the input analog signal must be sampled at a series of selected moments (some specified points on the time coordinate axis), and then these sampled values are converted to digital quantities. GeneralThe AD conversion process is accomplished through three steps: sample and hold, quantization and coding. ADParameters of converter: Resolution: explain the resolution of AD converter to input signal. Conversion error: the difference between the actual output of the AD...