编写题解 2945: 素数对 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h> using namespace std;int s(int n){ if(n==1) return 0; for(int …… 题解列表 2024年08月28日 0 点赞 0 评论 668 浏览 评分:0.0
没什么好说的 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main() { int i; scanf("%d",&i); i=(i>>4)&(~(~0<<4)); …… 题解列表 2024年08月29日 0 点赞 0 评论 457 浏览 评分:0.0
没什么好说的 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main() { int a,n,b,c; scanf("%u %d",&a,&n); b=a>>n; …… 题解列表 2024年08月29日 1 点赞 0 评论 623 浏览 评分:0.0
2880: 计算鞍点 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;long long a[100][100],n,sum=0;int main(){…… 题解列表 2024年08月29日 1 点赞 0 评论 723 浏览 评分:0.0
1190: 剔除相关数 摘要:核心:就挺难说的,暴力求解吧代码:def func(l): c = [] l1 = [0] * len(l) res = [] for i in range(l…… 题解列表 2024年08月29日 0 点赞 0 评论 390 浏览 评分:0.0
题解(C语言) ```c#include#include#includetypedefstruct{intdata;//存储符合条件的数字intsign;//该数字的首位数字intweishu;//该数字的位数}link;//比较函数,用于qsort排序intcmp(constvoid*a, 题解列表 2024年08月29日 0 点赞 0 评论 463 浏览 评分:0.0
1156题解(C语言) ```c#include#include//计算数字每位的立方和,并判断该和是否等于原数字intfun(inti){intn=i,sum=0;//计算每位数字的立方和while(n!=0){sum+=pow(n%10,3);n/=10;}//如果立方和等于原数字, 题解列表 2024年08月29日 0 点赞 0 评论 469 浏览 评分:0.0
链表合并(先排序,后合并)不用排序算法 这个题好像有两种思路:1.先合并,后排序2.先排序,后合并看了大家的解法都是第一种思路,我想试一下第二种思路。因为两个链表从键盘输入的时候是学号是无序的,所以我想能不能创建链表的时候就按学号有序的创建,然后合并的时候用两个指针遍历两个链表,哪个结点的学号小,就先连接哪个结点。 题解列表 2024年08月30日 0 点赞 0 评论 567 浏览 评分:0.0
1198: 取石子游戏 摘要:核心: 威佐夫博弈 a == (int)((b - a) * ((sqrt(5) + 1) / 2)):先手输,其他则先手赢代码:from math import sqrt while T…… 题解列表 2024年08月30日 0 点赞 0 评论 417 浏览 评分:0.0
1197: 发工资咯(贪心算法) 摘要:核心:票票从大开始扣,数量是最少的代码:while True: l = [int(x) for x in input().split()] n = l[0] if n =…… 题解列表 2024年08月30日 0 点赞 0 评论 568 浏览 评分:0.0