努力学习的萝啵啵
努力学习的萝啵啵
全部文章
分类
题解(7)
归档
标签
去牛客网
登录
/
注册
努力学习的萝啵啵的博客
全部文章
(共8篇)
题解 | #迷宫#
题解思路(按做题啵啵啵流程) 一、看到“最少走几步” 先想到: BFS 最短路 因为:每走一...
C++
2026-05-21
1
32
题解 | #N皇后问题#
#include<bits/stdc++.h> using namespace std; int n,ans; int r[20];// 第 x 行是否已经有皇后 int d1[40];// 主对角线是否有皇后,同一条主对角线满足:x-y 相等 int d2[40];// 副对角线是否有...
C++
2026-05-14
0
24
题解 | #老子的全排列呢#
#include<bits/stdc++.h> using namespace std; int a[9]; // 存当前排列 int v[9]; // 标记数字是否用过 //dfs(x)表示现在正...
C++
2026-05-14
1
16
题解 | #星球大战#
我是胡萝啵,喜欢啵啵啵(*  ̄3)(ε ̄ *) #include<bits/stdc++.h> using namespace std; int main(){ //mp1:按x存所有基地  ...
C++
2026-03-21
1
65
题解 | #Keep In Line#
#include <bits/stdc++.h> using namespace std; typedef pair<string,string> pss; int main(){ int t; cin>>t...
2026-03-10
2
59
题解 | #Rails#
模拟即可 #include <bits/stdc++.h> #include <vector> using namespace std; int main() { while(1){  ...
2026-03-09
2
69
题解 | #【入门班】急速行走#
啵啵(*  ̄3)(ε ̄ *)根本不会三分啊,借此机会学一学喽! 粘贴一下来自oiwiki的三分法喽 https://oiwiki.com/basic/binary/#三分法 基本步骤(求极小值) 假设函数 f(x) 在区间 [l,r] 上单峰: ...
C++
C
2026-03-06
3
69
题解 | #[NOIP2001]求先序排列#
萝啵啵是一个从C语言入手,还不太会用C++里string的萝卜,下面是不用string的解析(第一次写题解啵啵啵[嘤嘤嘤],有误请告诉啵啵捏,谢谢大家) #include <bits/stdc++.h> using namespace std; const int N=1e3; i...
2026-01-29
2
84