题解列表

筛选

3125: 局域网(net)

摘要:```cpp #include #include using namespace std; const int N=101,inf=0x3f3f3f3f; int n,m,mapp[N][N……

做过水仙花数的凑鼠鼠一个

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int f(int n){    int sum=0,t=n;    while(t)    {        sum+=(t%10)*……

3127: 联络员(liaison)

摘要:```cpp #include #include using namespace std; struct node { int from,to,dis; friend b……

鼠鼠是凑飞舞,打撒

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){    int x[100]={0,},k=0;    for(int i=0;i<=4;i++)    {   ……

区间求和(前缀和)

摘要:解题思路:前缀和 ·前缀和算法(Prefix Sum)是一种常用的数组处理技巧,用于快速计算数组中某个区间内的元素和。 ·前缀和算法的核心思想是先预处理出数组的前缀和,即将数组中每个位置的值设为该……

三个字符串排序

摘要:解题思路:使用strcpy()函数直接解决,strcpy()是直接覆盖拷贝的意思,例如:strcpy(a,b)是指将b的值覆盖到a上,是字符串注意事项:参考代码:#include<stdio.h>#i……

3046基础解法(Python)

摘要:解题思路:贪心算法注意事项:理解题意后注意限制要求,可优化参考代码:def cor(str_) :    global cnt    lst = list(str_)    flag = 0  # 标……