2945: 素数对(C++题解) 摘要:###定义一个bool型函数isPrime,接下来for循环即可 # 上代码! ```cpp //School// #include #include//调用sqrt函数需要写数学库头文件c…… 题解列表 2023年08月01日 0 点赞 0 评论 368 浏览 评分:9.9
for循环解决雇佣兵 摘要:解题思路:m为当前体力值,战斗力的增加δm等于最大体力值M和当前战斗力N的比值注意事项:可以另设n指代当前战斗力,N沿用题目本意,我只用N只是为了减少代码量;N<=M这一条件省略无用操作,也可以用wh…… 题解列表 2023年08月01日 0 点赞 0 评论 633 浏览 评分:2.0
用java进行的尝试 摘要:解题思路:注意事项:参考代码:import java.util.Scanner;public class tina{ public static void main(String[] args)…… 题解列表 2023年08月01日 0 点赞 0 评论 292 浏览 评分:9.9
8皇后 改(dfs) 摘要:解题思路:基本的dfs 改改最后的操作即可注意事项:对角线的表示参考代码:#include<iostream> using namespace std; const int N=9; int n…… 题解列表 2023年08月01日 0 点赞 0 评论 220 浏览 评分:9.9
八皇后(前三行)(总个数) 摘要:解题思路:dfs回溯 前三行要判断注意事项:对角线表示参考代码:#include<iostream> using namespace std; const int N=10010; int n,…… 题解列表 2023年08月01日 0 点赞 0 评论 224 浏览 评分:9.9
x皇后问题—字典序最小(dfs) 摘要:解题思路:dfs回溯即可,第一个即为字典序最小注意事项:记得终止程序参考代码:#include<iostream> using namespace std; const int N=10010;…… 题解列表 2023年08月01日 0 点赞 0 评论 215 浏览 评分:9.9
2878: 计算矩阵边缘元素之和(C语言) 摘要: #include int main() { int m, n; scanf("%d %d", &m, &n); int a[m][n]; for (int i =…… 题解列表 2023年08月01日 0 点赞 0 评论 280 浏览 评分:0.0
题解 1028: [编程入门]自定义函数求一元二次方程 摘要:解题思路:三个函数,g1 g2 g3主函数进行判断注意事项:1,变量类型 double,输出三位小数2,#include<math.h>3,g3中的输出表示参考代码:#include<stdio.h>…… 题解列表 2023年08月01日 0 点赞 0 评论 205 浏览 评分:9.9
1012: [编程入门]字符串分类统计 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int b[4]={0,0,0,0}; char a[200]; for (int i = 0; i != 2…… 题解列表 2023年08月01日 0 点赞 0 评论 208 浏览 评分:0.0
最大公约数与最小公倍数(C语言) 摘要:解题思路: 利用定义法求解。注意事项: 不要使用中文输入法编写代码。参考代码:#include<stdio.h>int main(){ int m,n,i,j; int max = 0…… 题解列表 2023年08月01日 0 点赞 0 评论 191 浏览 评分:9.9