牛客440904392号
牛客440904392号
全部文章
分类
归档
标签
去牛客网
登录
/
注册
牛客440904392号的博客
全部文章
(共258篇)
题解 | 后缀序列求值
#include<iostream> #include<stack> using namespace std; int main() { string s; cin >> s; stack<int> stack; f...
2026-01-10
0
24
题解 | 二叉树的形态树卡特兰数
n=int(input()) ans=1 for i in range(1,n+1):ans=ans*(2*n-i+1)//i print(ans//(n+1))
2026-01-10
0
18
题解 | 铺地板其实就是斐波那契数列
n=int(input()) if n<=2:print(n) else: p,q=1,2 for _ in range(n-2):p,q=q,(p+q)%999983 print(q)
2026-01-10
0
42
题解 | 2023_最快到达_1240bfs搜索求最短路
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc....
2026-01-10
0
28
题解 | 2023_数的间隙_1186
#include<iostream> #include<algorithm> using namespace std; int main() { int n, d; cin >> n >> d; int nums[n]; ...
2026-01-10
0
32
题解 | 2023_树的子结构_1446.txt
from collections import deque from sys import setrecursionlimit setrecursionlimit(2000) class TreeNode: def __init__(self, val='0', left=None, ...
2026-01-09
0
22
题解 | 2023_高尔夫比赛的森林砍树_1369按顺序访问多次bfs计算最短路
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int m = sc....
2026-01-09
0
27
题解 | WERTYU
s = input() t = "`1234567890-=QWERTYUIOP[]\ASDFGHJKL;'ZXCVBNM,./" map = {} for i in range(1, len(t)): map[t[i]] = t[i - 1] for c in s: i...
2026-01-09
0
19
题解 | Fibonacci
p,q=0,1 n=int(input()) if n<2:print(n) else: for _ in range(n-1):p,q=q,p+q print(q)
2026-01-09
0
19
题解 | 涂颜色快速幂+大整数取模+费马小定理
#include<iostream> #include<algorithm> using namespace std; int mod(string s) { long long remainder = 0; for (char c:s) remainde...
2026-01-09
1
16
首页
上一页
3
4
5
6
7
8
9
10
11
12
下一页
末页