Sat, 16 Nov 2019 12:15:38 +0800
parent
c4668710be
commit
68d4f3040b
@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"files.associations": {
|
|
||||||
"chrono": "cpp",
|
|
||||||
"type_traits": "cpp"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,23 +0,0 @@
|
|||||||
{
|
|
||||||
"tasks": [
|
|
||||||
{
|
|
||||||
"type": "shell",
|
|
||||||
"label": "g++.exe build active file",
|
|
||||||
"command": "D:\\Programs\\MSYS2\\mingw64\\bin\\g++.exe",
|
|
||||||
"args": [
|
|
||||||
"-H",
|
|
||||||
"-Wall",
|
|
||||||
"-Winvalid-pch",
|
|
||||||
"-I${workspaceFolder}\\.vscode",
|
|
||||||
"-g",
|
|
||||||
"${file}",
|
|
||||||
"-o",
|
|
||||||
"${fileDirname}\\${fileBasenameNoExtension}.exe"
|
|
||||||
],
|
|
||||||
"options": {
|
|
||||||
"cwd": "D:\\Programs\\MSYS2\\mingw64\\bin"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"version": "2.0.0"
|
|
||||||
}
|
|
||||||
@ -0,0 +1,15 @@
|
|||||||
|
```cpp
|
||||||
|
invT[1] = 1;
|
||||||
|
for (int i = 2; i < N; i++)
|
||||||
|
invT[i] = (mod - mod / i) * invT[mod % i] % mod;
|
||||||
|
```
|
||||||
|
|
||||||
|
$$
|
||||||
|
p=ax+b \\
|
||||||
|
ax+b \equiv 0 \pmod p\\
|
||||||
|
ab^{-1}+x^{-1} \equiv 0 \pmod p \\
|
||||||
|
x^{-1} \equiv -ab^{-1} \pmod p \\
|
||||||
|
x^{-1} \equiv -\left \lfloor \frac{p}{x} \right \rfloor (p\bmod x)^{-1} \pmod p \\
|
||||||
|
x^{-1} \equiv (p-p/x) (p\bmod x)^{-1} \pmod p \\
|
||||||
|
$$
|
||||||
|
|
||||||
Loading…
Reference in new issue