1108: 守望者的逃离 摘要:解题思路:本题使用贪心去解,如果走路比使用闪烁块就走路,如果闪烁快就直接用魔法在最开始时,如果有魔法就先把魔法用到不能再用为止用光魔法后开始比较走路与等待回魔+闪烁谁快将两种状态同时运行,当某个时间点…… 题解列表 2023年08月10日 0 点赞 0 评论 213 浏览 评分:0.0
求和训练(直接从头加到尾巴,不要分三大类相加) 摘要:解题思路:注意事项:除法运算的时候一定要注意保留两位小数参考代码:#include <stdio.h>int main(){ int i,a,b,c; float sum; scan…… 题解列表 2023年08月11日 0 点赞 0 评论 268 浏览 评分:0.0
1043: [编程入门]三个数字的排序(sort函数13行实现) 摘要:解题思路:sort函数用于C++中,对给定区间所有元素进行排序,默认为升序,也可进行降序排序。sort函数包含在头文件为#include<algorithm>的c++标准库中,使用的排序方法是类似于快…… 题解列表 2023年08月11日 0 点赞 0 评论 209 浏览 评分:0.0
注意头文件包含math.h 摘要:#include<stdio.h>#include<math.h>#define S(a,b,c) (a+b+c)*0.5#define area(S,a,b,c) sqrt(S*(S-a)*(S-b…… 题解列表 2023年08月11日 0 点赞 0 评论 222 浏览 评分:0.0
二级C语言-最小绝对值 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int a[10],i,min,min_i; for(…… 题解列表 2023年08月11日 0 点赞 0 评论 219 浏览 评分:0.0
C++ STL max_element 摘要:## max_element > 核心部分 `min_element(nums.begin()+r,nums.begin()+l+1)` ```c++ #include #inclu…… 题解列表 2023年08月11日 0 点赞 0 评论 323 浏览 评分:0.0
采用二进制移位法,循环一次即可 摘要:解题思路:采用二进制移位法,ABCDEF对应位状态为1是派出,0是留下。循环一次即可。注意事项:参考代码:#include<stdio.h>int main(){ int jieguo,max,num…… 题解列表 2023年08月12日 0 点赞 0 评论 226 浏览 评分:0.0
二维数组的转置(多种方法) 摘要: 参考代码: 第一种,直接行列互换循环打印, ```c #include int main() { int a[3][3],t; for(int i=0;i…… 题解列表 2023年08月13日 0 点赞 0 评论 275 浏览 评分:0.0
数据结构-归并排序(C++) 摘要:## 归并排序模板 ```c++ #include #include #include #include using namespace std; const int N = 1e5+…… 题解列表 2023年08月13日 0 点赞 0 评论 392 浏览 评分:0.0
1045: [编程入门]自定义函数之整数处理,c++代码实现 摘要:#1045: [编程入门]自定义函数之整数处理 ```cpp #include using namespace std; int a[11]; void out(){//用于输出的函数 …… 题解列表 2023年08月14日 0 点赞 0 评论 212 浏览 评分:0.0