python搜索,开两个数组记录同行同列 摘要: a,b=map(int,input().split()) while a!=-1 and b!=-1: c=[] d=[0 for x in range(a)] e…… 题解列表 2023年10月29日 0 点赞 0 评论 320 浏览 评分:0.0
矩阵的对角线之和(二种方法) 摘要:参考代码: 第一种: ```c #include int main() { int a[5][5],Diagonal1=0,Diagonal2=0; for(int i=0;i…… 题解列表 2023年10月29日 0 点赞 0 评论 370 浏览 评分:0.0
错误探测(用一二维数组储存行和列里1的数量,再判断二维数组里的元素是否为偶数,定义两个变量存储需要变的元素的行和列坐标,再定义一个变量判断是否需要变元素) 摘要: 参考代码: ```c #include int main() { int n; scanf("%d",&n); int a[n][n]; int ranks[2…… 题解列表 2023年10月29日 0 点赞 0 评论 281 浏览 评分:0.0
最简单!最容易理解! 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int N,i,x=1; scanf("%d",&N); for(i=1;i<N;i++) { x=(x…… 题解列表 2023年10月29日 0 点赞 0 评论 329 浏览 评分:9.0
完数的判断代码记录 摘要:解题思路:1.第一次用数组储存因子,无效数字的因子也会添加到数组里,时间超限2.第二次放弃数组,老老实实遍历注意事项:参考代码:用数组的代码,用到了指针,定义数组长度与输入数字相等#include<s…… 题解列表 2023年10月29日 0 点赞 0 评论 362 浏览 评分:0.0
暴搜求扫雷游戏地雷数 摘要:首先看这道题的数据范围,明显比较小。所以我们可以直接考虑暴力。 我们可以遍历每一个点,然后分别搜索每个点周围的雷的数量,然后直接输出。 一下是这种方式的代码。 ```cpp #include …… 题解列表 2023年10月28日 0 点赞 0 评论 765 浏览 评分:9.9
1136: C语言训练-求具有abcd=(ab+cd)2性质的四位数 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int hou(int i){ int s; s=i%100; return s;}int qian(int i){ int s,h…… 题解列表 2023年10月28日 0 点赞 0 评论 357 浏览 评分:9.9
整数去重(两种方法) 摘要:第一种是直接去掉重复元素(跟之前去掉空格那个思路一样): 参考代码: ```c #include int main() { int n; scanf("%d",&n); int …… 题解列表 2023年10月28日 0 点赞 0 评论 499 浏览 评分:0.0
2330: 信息学奥赛一本通T1178-成绩排序 摘要:解题思路:注意事项:参考代码:#include<iostream> #include<bits/stdc++.h> using namespace std; struct dev { …… 题解列表 2023年10月28日 0 点赞 0 评论 526 浏览 评分:0.0
2329: 信息学奥赛一本通T1177-奇度单增序列 摘要:解题思路:注意事项:参考代码:#include<iostream> #include<bits/stdc++.h> using namespace std; int main() { …… 题解列表 2023年10月28日 0 点赞 0 评论 391 浏览 评分:0.0