信息学奥赛一本通T1347-格子游戏 并查集 摘要: #include using namespace std; const int N = 40010; int p[N]; int n,m; …… 题解列表 2024年10月19日 1 点赞 0 评论 211 浏览 评分:9.9
亲和数c++语言 摘要:#include<iostream> using namespace std; int Yue(int n) { int sum = 0; for (int i = 1; i < n;…… 题解列表 2024年10月19日 0 点赞 0 评论 160 浏览 评分:0.0
只能说无意义的埋坑 摘要:参考代码:#include<bits/stdc++.h> using namespace std; int main() { string s; // cin>>s;有一个点…… 题解列表 2024年10月20日 0 点赞 1 评论 399 浏览 评分:0.0
python7行解决 摘要:解题思路:注意事项:参考代码:a = [int(i) for i in input().split()]b = int(input())c = 0for i in a: if b + 30 >=…… 题解列表 2024年10月20日 0 点赞 0 评论 505 浏览 评分:9.9
最简单的解法 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main() { int arr[9]; for (int i = 0; i < 9; i++) { scanf("%d",…… 题解列表 2024年10月20日 0 点赞 0 评论 251 浏览 评分:0.0
[编程入门]自定义函数处理最大公约数与最小公倍数 摘要:解题思路:一个主函数外加一个被调用函数,被调用函数中运用辗转相除法求最大公约数,主函数利用数学公式最小公倍数=a*b/最大公约数,求出最小公倍数。注意事项:被调用函数中使用辗转相除法时用while循环…… 题解列表 2024年10月20日 0 点赞 1 评论 579 浏览 评分:10.0
红与黑C++代码(程序不用回溯) 摘要:注意事项: 这个程序不用回溯,回溯过于浪费时间。参考代码:#include<bits/stdc++.h>using namespace std;int w,h,maxx;bool boo…… 题解列表 2024年10月20日 0 点赞 0 评论 249 浏览 评分:9.9
阶乘求和(自定义函数法) 摘要:解题思路:因为最后结果是由很多个阶乘相加,所以我们可以自定义一个阶乘函数,然后再利用循环将多个阶乘相加首先,自定义阶乘函数#include<iostream>using namespace std;l…… 题解列表 2024年10月20日 1 点赞 0 评论 685 浏览 评分:9.9
小卡拉米的示例 摘要:解题思路:注意事项:仔细一点就好了参考代码:#include<stdio.h>int main(){ int a,b; scanf("%d %d",&a,&b); int d; for(int i =…… 题解列表 2024年10月20日 0 点赞 0 评论 350 浏览 评分:0.0
菜鸡暴力解法,直接遍历出所有坐标 摘要:解题思路:遍历出需要挪树的具体坐标,再删除列表中重复的坐标,其值去减去其树的总数,就等于剩下的树注意事项:参考代码:# a表示这段路一共有多少棵树,b表示这段路一共有多少个区域a,b = map(in…… 题解列表 2024年10月20日 0 点赞 0 评论 368 浏览 评分:9.9