Hello World!
欢迎使用 zym2013 的博客 ¶
呃呃呃,还有亿亿亿点东西没写完。
这是一个支持 Markdown、 公式和代码高亮的博客系统。
为什么没有自定义组件呢?因为样式还没写……
数学公式 (KaTeX) ¶
行内公式:
块级公式:
矩阵示例:
代码高亮 (Shiki) ¶
# include <bits/stdc++.h># define ny(x) q_pow((x) , p - 2 , p)using namespace std;typedef long long LL;LL x , y , a , b;int p;unordered_map <LL , LL> mp;LL q_pow(LL x , LL y , int p){ LL res = 1; while(y) { if(y & 1) (res *= x) %= p; (x *= x) %= p; y >>= 1; } return res;}LL exgcd(LL a , LL b , LL& x , LL& y){ if(!b) return x = 1 , y = 0 , a; LL g = exgcd(b , a % b , y , x); y -= a / b * x; return g;}LL BSGS(LL a , LL b , int p){ b %= p; if(b == 1) return 0; mp.clear() , mp[b] = 0; LL hl = sqrt(p) + 1; for(int i = 1 ; i < hl ; i ++) mp[(b *= a) %= p] = i; b = 1; for(int i = 1 ; i <= hl ; i ++) (b *= a) %= p; LL n = 1; for(int i = 1 ; i <= hl ; i ++) { if(mp.count((n *= b) %= p)) return i * hl - mp[n]; } return -1;}LL exBSGS(LL a , LL b , int p){ a %= p , b %= p; if(b == 1 || p == 1) return 0; LL g = __gcd(a , (LL)p) , A = 1 , cnt = 0; while(g > 1) { if(b % g) return -1; cnt ++; b /= g , p /= g , A = A * a / g % p; if(A == b) return cnt; g = __gcd(a , (LL)p); } exgcd(A , p , x , y); x = (x + p) % p; (b *= x) %= p; LL req = BSGS(a , b , p); return (req < 0 ? -1 : req + cnt);}void solve(){ if(!a && !b && !p) return ; LL req = exBSGS(a , b , p); if(req < 0) cout << "No Solution\n"; else cout << req << "\n"; return ;}int main(){ int t = 1; while(cin >> a >> p >> b) solve(); return 0;}
行高亮/错误/警告/Diff ¶
var console: Consoleconsole.Console.log(...data: any[]): voidThe **`console.log()`** static method outputs a message to the console.
[MDN Reference](https://developer.mozilla.org/docs/Web/API/console/log_static)log('No errors, warnings or highlights')var console: Consoleconsole.Console.error(...data: any[]): voidThe **`console.error()`** static method outputs a message to the console at the 'error' log level.
[MDN Reference](https://developer.mozilla.org/docs/Web/API/console/error_static)error('Error') var console: Consoleconsole.Console.warn(...data: any[]): voidThe **`console.warn()`** static method outputs a warning message to the console at the 'warning' log level.
[MDN Reference](https://developer.mozilla.org/docs/Web/API/console/warn_static)warn('Warning') var console: Consoleconsole.Console.log(...data: any[]): voidThe **`console.log()`** static method outputs a message to the console.
[MDN Reference](https://developer.mozilla.org/docs/Web/API/console/log_static)log('Highlighted') var console: Consoleconsole.Console.log(...data: any[]): voidThe **`console.log()`** static method outputs a message to the console.
[MDN Reference](https://developer.mozilla.org/docs/Web/API/console/log_static)log('hewwo') var console: Consoleconsole.Console.log(...data: any[]): voidThe **`console.log()`** static method outputs a message to the console.
[MDN Reference](https://developer.mozilla.org/docs/Web/API/console/log_static)log('hello')
var console: Consoleconsole.Console.log(...data: any[]): voidThe **`console.log()`** static method outputs a message to the console.
[MDN Reference](https://developer.mozilla.org/docs/Web/API/console/log_static)log('Highlighted')var console: Consoleconsole.Console.log(...data: any[]): voidThe **`console.log()`** static method outputs a message to the console.
[MDN Reference](https://developer.mozilla.org/docs/Web/API/console/log_static)log('Highlighted')var console: Consoleconsole.Console.log(...data: any[]): voidThe **`console.log()`** static method outputs a message to the console.
[MDN Reference](https://developer.mozilla.org/docs/Web/API/console/log_static)log('Not highlighted')
var console: Consoleconsole.Console.log(...data: any[]): voidThe **`console.log()`** static method outputs a message to the console.
[MDN Reference](https://developer.mozilla.org/docs/Web/API/console/log_static)log('Not highlighted')var console: Consoleconsole.Console.log(...data: any[]): voidThe **`console.log()`** static method outputs a message to the console.
[MDN Reference](https://developer.mozilla.org/docs/Web/API/console/log_static)log('Highlighted')var console: Consoleconsole.Console.log(...data: any[]): voidThe **`console.log()`** static method outputs a message to the console.
[MDN Reference](https://developer.mozilla.org/docs/Web/API/console/log_static)log('Not highlighted')
console.log('1')console.log('2')console.log('3')console.log('4')
代码聚焦 ¶
console.log('Not focused')console.log('Not focused')console.log('Focused') console.log('Not focused')console.log('Focused') console.log('Not focused')
字段突出 ¶
const const message: "Hello World"message = 'Hello World'var console: Consoleconsole.Console.log(...data: any[]): voidThe **`console.log()`** static method outputs a message to the console.
[MDN Reference](https://developer.mozilla.org/docs/Web/API/console/log_static)log(const message: "Hello World"message) // prints Hello World
const const message: "Hello World"message = 'Hello World'var console: Consoleconsole.Console.log(...data: any[]): voidThe **`console.log()`** static method outputs a message to the console.
[MDN Reference](https://developer.mozilla.org/docs/Web/API/console/log_static)log(const message: "Hello World"message) // prints Hello World
const msg = 'Hello World'console.log(msg)console.log(msg) // 打印 Hello World
TypeScript 语法分析 ¶
var console: Consoleconsole.Console.log(...data: any[]): voidThe **`console.log()`** static method outputs a message to the console.
[MDN Reference](https://developer.mozilla.org/docs/Web/API/console/log_static)log('normal eslint twoslash')const const unused: 1unused = 1type type Foo = {
bar: string;
}
Foo = { bar: stringbar: string}
var console: Consoleconsole.Console.log(...data: any[]): voidThe **`console.log()`** static method outputs a message to the console.
[MDN Reference](https://developer.mozilla.org/docs/Web/API/console/log_static)log(let x: [string, number]x[0].String.substring(start: number, end?: number): stringReturns the substring at the specified location within a String object.substring(1))var console: Consoleconsole.Console.log(...data: any[]): voidThe **`console.log()`** static method outputs a message to the console.
[MDN Reference](https://developer.mozilla.org/docs/Web/API/console/log_static)log(let x: [string, number]x[1].Property 'substring' does not exist on type 'number'.substring(1))
代码组 ¶
额,这里还没写完……
:::code-group
export default { port: 3000}
export default { port: numberport: 3000}
{ "name": "test"}
:::
自定义组件 ¶
快去点个 star!
hi
信息
hi
提示
hi
成功
hi
重点
hi
警告
hi
注意
hi
错误
hi
危险
hi
详情
hi
Badge ¶
NEW 这是一个新功能
BETA 测试版