三行主代码简单写法 摘要:解题思路:||,&&前者判断左侧为假(0)输出右侧,后者相反注意事项:无参考代码:#include<stdio.h>int main(){ int a; scanf("%d", &a); …… 题解列表 2024年10月18日 1 点赞 0 评论 571 浏览 评分:9.9
利用python循环和数列解决 注意事项:菜鸡解法,分别看需要满足的条件依次进行解题写代码来满足他参考代码:a=int(input())b=[]f=[]c=0d=0e=0foriinrange(a):b.append(list(input().split()))#c表示第一科成绩总分foriinrange(a):c=int(b[i] 题解列表 2024年10月18日 0 点赞 0 评论 696 浏览 评分:9.9
可以判断空格不输出 摘要:解题思路:注意事项:参考代码:#include<string.h>int main(){ int i,a,b; char str1[100],str2[100]; gets(str1); get…… 题解列表 2024年10月18日 0 点赞 0 评论 633 浏览 评分:9.9
使用嵌套数组解决 解题思路:python中无法创建矩阵,但是可以使用数组进行模拟矩阵,模拟后使用max函数和abs函数进行输出绝对值最大值,最后使用遍历找出数组的位置,因为数组的位置是从0开始,所以最后i,j坐标分别都要加1.参考代码:a=int(input())b=[]c=0foriinrange(a):temp=[ 题解列表 2024年10月19日 0 点赞 0 评论 593 浏览 评分:9.9
试图解释答案为什么是F E 解题思路:1.看题目要求,本题要求输出选项ABC,2.先判断选项所代表的数据类型,和a,b输出的数据类型,再看看题目所写的代码有没有强制类型转换,不过本题没有强制类型转换,所以可以不用考虑,3.判断题目给出的代码预期结果是什么,在假设a和b的开始时的数据类型相同的情况下注意事项:a, 题解列表 2024年10月19日 3 点赞 0 评论 1151 浏览 评分:9.9
[蓝桥杯2022年第十三届决赛真题-最大数字] 贪心+dfs #咋还给我爆longlong了啊这题```cpp#include#defineULLunsignedlonglong#defineLLlonglong#defineendl'\n'#definedebug(a)cout>B;len=num.size();for(inti=0;i 题解列表 2024年10月19日 0 点赞 0 评论 906 浏览 评分:9.9
信息学奥赛一本通T1346-亲戚(relation) 并查集 此题有毒 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;const int MAXN = 20010;int father[MAXN];in…… 题解列表 2024年10月19日 0 点赞 0 评论 852 浏览 评分:9.9
信息学奥赛一本通T1347-格子游戏 并查集 #includeusingnamespacestd;constintN=40010;intp[N];intn,m;intfind(intx){if(p[x]!=x){p[x]=find(p[x]);}returnp[x];}intget(intx, 题解列表 2024年10月19日 1 点赞 0 评论 588 浏览 评分:9.9
python7行解决 摘要:解题思路:注意事项:参考代码:a = [int(i) for i in input().split()]b = int(input())c = 0for i in a: if b + 30 >=…… 题解列表 2024年10月20日 1 点赞 0 评论 944 浏览 评分:9.9
红与黑C++代码(程序不用回溯) 摘要:注意事项: 这个程序不用回溯,回溯过于浪费时间。参考代码:#include<bits/stdc++.h>using namespace std;int w,h,maxx;bool boo…… 题解列表 2024年10月20日 0 点赞 0 评论 613 浏览 评分:9.9