1036: [编程入门]带参数宏定义练习 摘要:解题思路:定义一个带参的宏,使两个参数的值互换,并写出程序,输入两个数作为使用宏时的实参。参考代码:#include <stdlib.h> #include <stdio.h> #define…… 题解列表 2024年03月03日 0 点赞 0 评论 412 浏览 评分:0.0
三国游戏-简单易看懂 摘要:解题思路:将胜国每个事件发生时相对于其他两国的兵力增量记录并排序,只要他的事件增量大于0,那么这个事件就可以发生,最后从三个国家获胜情况中找到最大的事件数即可注意事项:参考代码:#include<bi…… 题解列表 2024年03月03日 2 点赞 0 评论 1050 浏览 评分:9.3
【C语言题解】蓝桥杯2023年第十四届省赛真题-平方差 摘要:``` #include int main(){ long int L,R,cnt; scanf ("%ld%ld",&L,&R); //x=y*y-z*z 即x…… 题解列表 2024年03月03日 4 点赞 3 评论 1153 浏览 评分:10.0
绝对值排序 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;bool cmp(int a,int b){ return abs(a)>ab…… 题解列表 2024年03月03日 0 点赞 0 评论 346 浏览 评分:0.0
阶乘求和的“骗术” 摘要:注意事项: 当int使用之后,根据测试用例,算出结果正确时,而提交未通过时,要多看看题目对于数的限制,n不超过20,而20的阶乘是一个很大的数,可能已经超过int的范围,这个时候我们考虑用long l…… 题解列表 2024年03月03日 0 点赞 0 评论 331 浏览 评分:0.0
飞机降落-详细注释易看懂(暴力枚举) 摘要:解题思路:n限制小,选择暴力枚举,找到降落顺序,详细注释注意事项:参考代码:#include using namespace std; const int N = 10+20; struct pl…… 题解列表 2024年03月03日 0 点赞 2 评论 1299 浏览 评分:8.5
石头剪刀布 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int n,na,nb; cin >> n >> na >>…… 题解列表 2024年03月03日 0 点赞 0 评论 403 浏览 评分:6.0
完数的判断(c语言) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<stdbool.h>bool jugewan(int n){ int i,sum=0; for(i=1;i…… 题解列表 2024年03月03日 0 点赞 0 评论 362 浏览 评分:9.9
用三目操作符求最大值 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ int a=0; int b=0; int c=0; scanf("%d %d %d"…… 题解列表 2024年03月03日 0 点赞 0 评论 672 浏览 评分:0.0
多项式输出题解 摘要:```java import java.util.*; public class Main { public static void main(String[] args) { …… 题解列表 2024年03月03日 0 点赞 0 评论 334 浏览 评分:9.9