1.UVa 11300
State compression, enumerating the state of the first row for check.
#include<bits/stdc++.h>
#define rep(i,x,y) for(register int i=x;i<=y;i++)
#define dec(i,x,y) for(register int i=x;i>=y;i--)
#define ll long long
using namespace std;
const int N=20;
const int inf=0x3f3f3f3f;
inline int read(){
int x=0,f=1;char ch=getchar();
while(!isdigit(ch)){if(ch=='-')f=-1;ch=getchar();}
while(isdigit(ch)){x=(x<<1)+(x<<3)+(ch^48);ch=getchar();}
return x*f;}
int kase,n;
int a[N][N],b[N][N];
inline int check(int s){
memset(b,0,sizeof b);
for(int ...
This article is used to record built-in functions in Python. andIts functions are supplemented at any time.
Complete built-in functions and their descriptions are available in the official documentation: https://docs.python.org/3.5/library/functions.html
Universal built in function:
    id() Function: look at the memory address of the object;
    help()Function: view help information;
    type()Function: look at the type of the object; do not think that the subclass is a parent type.
    isinstance()Function: view object type; think subclass is a kind of parent...
Your level does not depend on how many questions you solve, but depends on how you think. When you are trying to solve a problem, you should first think independently. If you really don’t have any ideas, you should read others’solutions bit by bit rather than all at once, making sure you have as much as possibleYou made it yourself. After that, think carefully about why you can’t think of those parts that depend on the solution. Do not copy other people’s code. Everyone has his unique way of solving problems — Mao Xiao. Mao thought an interesting translation of &...
I thought about it for a while after class, and found something.
Â
$$n = \prod_{i = 1} ^ m p_i ^ {a_i}$$
$$f(n) = \sum_{i = 1} ^ m a_i$$
Given $n < 998244353$, how many numbers are there from $1$to $n$, which satisfies $f (I) $even.
Â
With an odd number of $x $and an even number of $y $obviously $x + y = n$, if you can construct a linear combination of $x, y $and easily calculate its value, you can solve the problem.
Just when I studied the sieve, I knew there was such a function:
$$\lambda(n) = (-1) ^ {\sum_{i = 1} ^ m a_I}$$
Consider the meaning of $T = 1_ sum {i = 1} ^ n_ lambda (i) $...
Circle problem: 
  For integer operations, one important thing to understand is that it rounds down the result, that is, the value after rounding is not greater than the actual value. Therefore, if the result is negative, the rounded result will be farther from zero, such as – 3.3 rounded result is – 4. This means that the -10 / / 3 will be rounded down to the top.-4, instead of rounding up to -3.
>>> 10 // 3
3
>>> 10 // -3Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â The 10 / / 3 rounding in the left code is 3; -10 / 3.
-4Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â...
html1=”””<!DOCTYPE html><html lang=”en” xmlns=”http://www.w3.org/1999/xhtml”><head> <meta charset=”utf-8″ /> <title>My first web page is < /title> <meta name=”generator” content=”EverEdit” /> <meta name=”author” content=”” /> <meta name=”keywords” content=”” /> <meta name=”description” content=”” /></head><body> <div class=”rows”>...
Fluent python (password: fil0)
Author: [Brazil] Luciano Ramalho
Brief Introduction: This book is written by Luciano Ramalho, a Python developer who has been struggling for nearly 20 years in Python, and is written by Victor Stinner, Alex Martelli, and other Python technical reviewers to analyze programming details from a language design perspective.Python 3 and Python 2, tell you the causes and solutions of language pitfalls that you can’t understand without hands-on Python practice, and teach you to write genuine Python code.
Â
Django( Password: 7cyg)
Â
Full stack performance test...
This article is used to record standard modules in Python and update at any time.
decimalModule (solving fractional circulation problem):
>>> import decimal
>>> a = decimal.Decimal(‘10.0’)
>>> b = decimal.Decimal(‘3’)
>>> a / b
Decimal(‘3.333333333333333333333333333’)
Â
fractionsModule (solving fractional presentation problem):
>>> from fractions import Fraction
>>> Fraction(10, 3)
Fraction(10, 3)
>>> Fraction(10, 4)
Fraction(5, 2)
>>> Fraction(6, 2)
Fraction(3, 1)
Â