奖学金-题解(C++代码)(结构体排序做的) 将学号和各科成绩及总分五项数据项做成一个结构体,对结构体对象进行排序先写结构体:```cpptypedefstruct{intxuehao;intyuwen;intshuxue;intyingyu;intsum;}student;```利用了sort函数来排序结构体对象, 题解列表 2019年11月17日 0 点赞 0 评论 1769 浏览 评分:5.2
取石子游戏-题解(C语言代码)值得参考 #####大佬代码值得参考#include#includeusingnamespacestd;intmain(){intx,y;doublealpha=(1.0+sqrt(5.0))/2.0;doublebeta=(3.0+sqrt(5.0))/2.0;while(cin>>x>>y){if(x>y) 题解列表 2019年11月30日 0 点赞 0 评论 2540 浏览 评分:5.2
二级C语言-寻找矩阵最值-题解(C语言代码) 摘要:```c #include int main() { int n,i; scanf("%d",&n); getchar(); int a[n][n]; int max_i=…… 题解列表 2019年12月02日 0 点赞 0 评论 1476 浏览 评分:5.2
成绩排序 (C++代码) #思路实现自定义类型的比较规则即可。#代码```cpp#include#include//结构体:学生信息,包括姓名、年龄、成绩structStudent{std::stringname;intage;intscore;};//重点:实现结构体Student的比较规则intcompareStu(Stu 题解列表 2019年12月29日 0 点赞 0 评论 2611 浏览 评分:5.2
数据结构-稀疏矩阵转置-题解(C语言代码) 因为这里的M*N小于12500,所以就把12500开根号取111;代码如下:```c#include#defineM111#defineN111#defineMaxSize12500typedefstruct{intr;//行号intc;//列号intd;//元素值}TupNode;//三元组类型ty 题解列表 2020年03月14日 0 点赞 0 评论 1355 浏览 评分:5.2
王牌花色-题解(C++代码) 摘要:```cpp #include #include using namespace std; string f(string s){ if(s=="J"){ re…… 题解列表 2020年03月28日 0 点赞 0 评论 1209 浏览 评分:5.2
[STL训练]Who's in the Middle -题解(C语言代码) 这题主要是考查STL中的sort函数用法。即为sort(数组首地址,数组的末地址的后一位,cmp)cmp是比较函数,如果未给出,则默认为从小拍到大。```cpp#include#include#includeusingnamespacestd;#defineN1000intmain(){intn;sc 题解列表 2020年10月10日 0 点赞 0 评论 1322 浏览 评分:5.2
[编程入门]利润计算-题解(C语言代码) 摘要:解题思路:这题不难,只是比较费时间和眼力罢了;注意事项:参考代码:#include <stdio.h>int main(){ int a,b; scanf("%d",&a); if(a>=0 && a…… 题解列表 2020年11月24日 0 点赞 1 评论 891 浏览 评分:5.2
蓝桥杯2018年第九届真题-交换次数-题解(Java代码) 解题思路:①首先统计ABT三个字母的次数②ABT全排列有6种方式,调用cal(Strings1,Strings2,Strings3,charc1,charc2,charc3)方法计算③s1表示第一个字母长度的字符串,s2表示第二个字母长度的字符串, 题解列表 2021年01月13日 0 点赞 0 评论 2189 浏览 评分:5.2
求圆的面积-题解(Python代码) 摘要:解题思路:注意事项:参考代码:import math r=float(input()) s=math.pi*r*r print('%.2f'%s)…… 题解列表 2021年01月27日 0 点赞 0 评论 1290 浏览 评分:5.2