在努力存钱的小松鼠很矫健
在努力存钱的小松鼠很矫健
全部文章
分类
归档
标签
去牛客网
登录
/
注册
在努力存钱的小松鼠很矫健的博客
全部文章
(共57篇)
题解 | 向量点乘,这题没啥,就是点乘
class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * 计算两个三维向量的点乘结果 * @param vector1 int整型vector 第一个向量 ...
2025-08-17
0
28
题解 | 求峰谷点数,这题没啥,主要是条件记得写正确
class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * 求序列a中的峰、谷点的个数 * @param a int整型vector 序列a * @retur...
2025-08-17
0
23
题解 | 【模板】序列操作,这题可以经常看看记忆。注意从循环用的字母不要和变量一样,容易混淆
#include <algorithm> #include <functional> #include <iostream> #include <vector> using namespace std; int main() { int q;...
2025-08-17
0
33
题解 | 两直线交点,有点复杂,因为首先把公式先对就困难,其次还需要考虑两直线平行的情况,分母不为零
#include<bits/stdc++.h> #include <iomanip> using namespace std; struct point{ double x,y; point(double A,double B){ x=A,y...
2025-08-15
0
41
题解 | 直线与圆交点间距,先求圆心到直线的举例,再用勾股定理,结果别忘记乘以2
#include <bits/stdc++.h> #include <cmath> #include <math.h> using namespace std; struct point{ double x,y; point(double A,d...
2025-08-15
0
32
题解 | 三角形面积,叉乘记得加绝对值
#include <bits/stdc++.h> using namespace std; struct point{ double x,y; point(double A,double B){ x=A,y=B; } point() = ...
2025-08-15
0
34
题解 | 点到直线距离, 主要是需要叉乘得到三角形面积,然后除以底,就可以得到高,为距离
#include <bits/stdc++.h> #include <cmath> using namespace std; struct point{ double x,y; point(double A,double B){ x=A,y=...
2025-08-15
0
48
题解 | 学生综合评估系统,这题没啥,就是判断一下大小,其余的都写好了
#include<bits/stdc++.h> using namespace std; // 定义学生结构体 struct Student{ int id; int academic_score; int activity_score; }; // 评估函数...
2025-08-15
0
36
题解 | 两点间距离,这题没啥,结构体都写好了
/** * struct Point { * int x; * int y; * Point(int xx, int yy) : x(xx), y(yy) {} * }; */ #include <math.h> class Solution { public: /*...
2025-08-15
0
32
题解 | 最厉害的学生,需要创建结构体,然后 比较大小,类也可以是向量,需要初始化向量长度
#include <iostream> #include <vector> using namespace std; struct student{ string s; int c1; int c2; int c3; int sum;...
2025-08-15
0
39
首页
上一页
1
2
3
4
5
6
下一页
末页