题解 1798: 汪汪与打针(C) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int m(int a,int b) //计数函数{ int i,x=120,s=a; //i是最后的次数,x是本次的花费…… 题解列表 2023年02月15日 0 点赞 0 评论 278 浏览 评分:0.0
计算三角形面积,海伦公式 摘要:解题思路:海伦公式sprt(p(p-a)(p-b)(p-c)),p为三角形的半周长注意事项:涉及距离计算,最好用双精度变量进行存储参考代码:#include <stdio.h>#include <ma…… 题解列表 2023年02月15日 0 点赞 0 评论 452 浏览 评分:6.0
短路运算代替判断语句 摘要:解题思路:利用逻辑运算进行短路运算注意事项:考虑逻辑运算表参考代码:#include <stdio.h>int main() { int n; scanf("%d",&n); n%3…… 题解列表 2023年02月15日 0 点赞 0 评论 1063 浏览 评分:9.3
蓝桥杯2020年第十一届省赛真题-走方格 摘要:解题思路:第一行和第一列初始化为1注意事项:行号和列数都是偶数,不能走入这一格中。参考代码:#include<iostream>using namespace std;int n,m;int arr[…… 题解列表 2023年02月15日 0 点赞 0 评论 366 浏览 评分:9.9
利用逻辑运算来输出 摘要:解题思路:利用逻辑运算来输出,逻辑运算的输出数值只有0和1注意事项: //逻辑运算 //与运算:只要有一个假就为假 //或运算:只要有一个真就可以真 //异或运算:一真一假才为真参考代…… 题解列表 2023年02月15日 0 点赞 0 评论 489 浏览 评分:10.0
短路运算代替判断语句 摘要:解题思路:用短路运算来进行判断,语句更加简洁注意事项:参考代码:#include <stdio.h>int main() { int x; scanf("%d",&x); (x==1…… 题解列表 2023年02月15日 0 点赞 0 评论 490 浏览 评分:9.9
2856: 潜伏者 (C++) 摘要:解题思路: 根据输入建立译码表 检查2、3情况的发生注意事项:参考代码:#include <iostream> // #include <sstream> // #include <c…… 题解列表 2023年02月15日 0 点赞 0 评论 419 浏览 评分:6.0
2857: 加密的病历单 C++ 摘要:解题思路: 加密时: 1. 反转 2. 大小写转换 3. 循环左移3位 则解密时: &nbs 题解列表 2023年02月15日 0 点赞 0 评论 428 浏览 评分:9.9
日期排序 冒泡排序加结构体 摘要:解题思路:注意事项:输出时%02d补齐0,否则左侧只会输出2不会输出02参考代码:#include<stdio.h>struct date{ int y; int m; int d;…… 题解列表 2023年02月15日 1 点赞 0 评论 428 浏览 评分:0.0
蓝桥杯2018年第九届真题-防御力 摘要:解题思路:注意事项:参考代码:n1,n2=map(int,input().split()) lsA=list(map(int,input().split())) copy_lsA=[_ for _…… 题解列表 2023年02月15日 0 点赞 0 评论 342 浏览 评分:9.9