费姣人
费姣人
全部文章
分类
归档
标签
去牛客网
登录
/
注册
费姣人的博客
全部文章
(共20篇)
题解 | 机器翻译
#include <iostream> #include <queue> using namespace std; // 机器翻译,根据单词查找释义,缓存无,找外存,然后插入缓存中,如果缓存未满,则直接插入,满了,则删掉最早进入,然后插入最新,求在外存查字典的次数 const...
2026-01-30
1
42
题解 | 用两个栈实现队列
class Solution //用两个栈来实现队列,进行插入和删除操作, //插入:先将元素push进第一个栈 //删除操作:如果第二个栈有元素,就弹出第二个栈的元素(符合队列的先进先出), ///如果空,则将第一个栈中元素全部弹出,push进第二个栈中, //然后执行pop操作,...
2026-01-30
1
46
题解 | 队列消数
class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param tickets int整型vector * @param k int整型 ...
2026-01-29
1
40
题解 | 验证栈序列
#include <iostream> #include <stack> using namespace std; // 入栈序列能等于出栈序列,输出是否;入栈序列一个个入栈,并于出栈序列比较,如果于出栈序列相等则出栈,循环语句,入栈前一个元素与下一个 出栈元素相等,则出栈...
2026-01-29
1
46
题解 | 直线与圆交点间距
#include <bits/stdc++.h> using namespace std; struct point{ double x,y; point(double A,double B){ x=A,y=B; } point() = ...
2026-01-24
1
23
题解 | 三角形面积
#include <bits/stdc++.h> using namespace std; struct point{ double x,y; point(double A,double B){ x=A,y=B; } point() = ...
2026-01-24
1
38
题解 | 点到直线距离
#include <bits/stdc++.h> using namespace std; //计算点到直线的距离 struct point{ double x,y; //结构体中可以有构造函数,与c的区别,c只能有变量 point(double A,doubl...
2026-01-24
1
42
题解 | 凯撒解密
class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * 进行凯撒解密 * @param password string字符串 旺仔哥哥的密码 * @par...
2026-01-23
1
25
题解 | 简写单词
#include <iostream> #include <string> using namespace std; //输出每个单词的首字母大写,疑似笨方法,找空格,输出下一字母 int main() { string s; char fist; ...
2026-01-22
1
37
题解 | 矩阵转置
#include <iostream> using namespace std; const int MAX = 11; //矩阵转置temp=a[i][j],a[i][j] = a[j][i]; a[j ][ i] = temp; int main() { int a[MAX...
2026-01-17
1
34
首页
上一页
1
2
下一页
末页