大便王
大便王
全部文章
分类
题解(2)
归档
标签
去牛客网
登录
/
注册
大便王的博客
全部文章
(共10篇)
题解 | #何yc走夜路#
模拟题,跟课后作业一样,观察输出的样例,三行的时候第一行v在0和4,第二行v在1和3,第三行在2,这样可以找到规律,j=2n-2-i即可。 #include<bits/stdc++.h> using namespace std; int main(){ int n; w...
C++
2025-12-28
0
12
题解 | 年轻人不讲5的
#include<bits/stdc++.h> using namespace std; int main(){ string s;cin>>s; for(char &a:s) if(a=='5') a='*'; for(char b:s)c...
2025-12-12
0
20
题解 | 扫雷
#include<bits/stdc++.h> using namespace std; const int MAX = 1020; char mp[MAX][MAX]; int ans[MAX][MAX]; int dx[] = {-1, -1, -1, 0, 0, 1, 1, ...
2025-12-10
0
18
题解 | 杨辉三角
#include<bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<int> r(n, 0); r[0] = 1; for ...
2025-12-09
0
14
题解 | 校门外的树
#include<bits/stdc++.h> using namespace std; int main() { unordered_set<int>x; int l,m; cin>>l>>m; while(m--)...
2025-12-09
0
20
题解 | 牛牛学数列5
#include <bits/stdc++.h> using namespace std; int f(int n) { if (n == 1 || n == 2) { return 1; } return f(n-1) + f(n-2); } ...
2025-12-02
0
15
题解 | 最大的差
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; vector<int>b; while(n--){ int a; ...
2025-12-02
0
15
题解 | 牛牛学数列
#include<bits/stdc++.h> using namespace std; int solve(int n){ return n%2 ? (n+1)/2 : -n/2; } int main(){ int x; cin >> x; ...
2025-12-02
0
20
题解 | 素数判断
#include<bits/stdc++.h> using namespace std; bool isPrime(int n) { if (n < 2) return false; for (int i = 2; i * i <= n; i++) {//实...
2025-12-02
0
17
通俗易懂的国庆题解
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA print("QUIE NO1") BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB...
2025-10-04
1
40