题解列表

筛选

c语言解题目,yyds

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){  int n;  scanf("%d",&n);  int a[10][10];  for(int i=0;i<……

记忆化搜索-取球博弈

dfs搜索每种可能走法,vis数组存出现过的场面防止重复递归存在对手输则自己赢,不存在则查看是否可能出现平局,若两者情况都没有就必败注意每次递归交换操作对象```cpp#includeusingnamespacestd;typedeflonglongll;constintN=1e5+5;intn[5]

编写题解 1029: [编程入门]自定义函数处理素数

#编写题解1029:[编程入门]自定义函数处理素数**https://www.dotcpp.com/oj/problem1029.html**##解题思路1.素数的定义是大于1的自然数中,只能被1和他本身整除,1不是素数.2.因此要判断一个数是否为素数.就要判断它能不能被比他小的所有素数整除,

利用最大公因数来求解

摘要:解题思路:注意事项:参考代码:# 求最大公因数 def cal(temp_1, temp_2):     if(temp_1 == temp_2):         return(temp_1)……

C++代码简便

摘要:解题思路:注意事项:参考代码:#include <iostream>using namespace std;int main() { int H = 0, M = 0, S = 0; int t; c……

矩形面积交

摘要:解题思路:注意事项:import java.util.Scanner; public class Main {     public static void main(String[] arg……

1119水仙花数求解

摘要:解题思路:有点复杂,但比较基础,就是用每个位数的立方来写!注意事项:参考代码:#include<stdio.h>int main(){   int i,j;    scanf("%d",&i);   ……