题解列表

筛选

3059: 开餐馆 DP DP DP DP

摘要:解题思路:注意事项:参考代码:#include"bits/stdc++.h" using namespace std; int t,n,k,m[110],p[110],dp[1100]; int……

字符类型统计

摘要:解题思路:数组,便于想到注意事项:参考代码:#include<string.h>void fun(char a[]){ int p=0,b=0,c=0,d=0,i; int len=strlen(a)……

简单易懂的解

摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <string.h>int main(){    char a[200];        gets(a);    i……

递归7行解决猴子吃桃

摘要:参考代码:n=eval(input())def peach(m):    if m==n:        return 1    else:        return 2*(peach(m+1)+1……

数据结构-链表的基本操作--C语言

摘要:解题思路:保存题解注意事项:需要确保即使初始元素数量为 0,链表仍然有一个有效的头结点。这样可以避免在后续操作中因为 L 为 NULL 而导致的问题参考代码:#include <stdio.h> #……

字符菱形的c语言解法

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){    char a;    scanf("%c",&a);    printf( "  %c  \n %c%c%……

老头也能看懂的for循环

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

新手必看,一正常,一函数递归

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main() {    int n;    long long cows[55] = {0};     // 初始化前三年的母牛……