冲锋的牛牛
冲锋的牛牛
全部文章
分类
题解(5)
归档
标签
去牛客网
登录
/
注册
冲锋的牛牛的博客
全部文章
(共12篇)
题解 | 机器翻译
#include <iostream> #include <queue> using namespace std; /* 代码思路: 如果输入的单词不存在小本本里,就查词典记录在小本本,如果小本本满了就删除最先记录的单词。如果在小本本就啥也不操作,关键词为“删除最先记录”,符...
2025-08-21
0
17
题解 | 吐泡泡
#include <iostream> #include <stack> using namespace std; // 判断栈顶的两个元素是否均为两个大泡泡O bool isDelBig(stack<char>& astk) { if (ast...
2025-08-19
0
17
题解 | 扫雷
#include <iostream> #include <vector> using namespace std; int main() { int n, m, sum; cin >> n >> m; // 行留出来首行和尾...
2025-08-14
0
19
题解 | 牛牛数数
#include <iostream> using namespace std; int main() { // 升序输出表明从1开始至n结束,每次递增1,从中剔除4的倍数或包含数字4的 // 最大输入1e5说明最多有6位数字,用6个变量分别存储6个数字位,a用来判断是否...
2025-08-13
0
19
题解 | 牛牛学数列4
#include <iostream> using namespace std; int main() { // 等差数列前n项和计算公式,sn = (a1 + an) * n / 2 // 计算 s1 + s2 + ... + sn int n; c...
2025-08-13
0
29
题解 | 最大的差
#include <iostream> using namespace std; int main() { int n; cin >> n; // 通过记录最大值最小值来计算出最大差值 int a; cin >> a; ...
2025-08-13
0
19
题解 | 牛牛学说话之-字符串
#include <iostream> using namespace std; int main() { string s; cin >> s; cout << s; } 推荐使用string类型,cin输入,cout输出。
2025-08-12
0
24
题解 | #数组中重复的数字#
# # 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 # # # @param numbers int整型一维数组 # @return int整型 # class Solution: def duplicate(self , numbers ): ...
Python3
2021-09-17
0
315
题解 | #替换空格#
# # 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 # # # @param s string字符串 # @return string字符串 # class Solution: def replaceSpace(self , s ): # w...
Python3
2021-09-16
0
352
题解 | #斐波那契数列#
# -*- coding:utf-8 -*- class Solution: def Fibonacci(self, n): # write code here l0 = 0 l1 = 1 l = [l0, l1] ...
Python3
2021-09-16
3
568
首页
上一页
1
2
下一页
末页