• 个人简介

    #include<bits/stdc++.h>
    #include<cstdio>
    #include<stdio.h>
    #include<istream>
    #include<ostream>
    #include<iostream>
    #include<sstream>
    #include<cstdlib>
    #include<ios>
    #include<stdlib.h>
    #include<ctime>
    #include<time.h>
    #include<cmath>
    #include<math.h>
    #include<bits/c++config.h>
    #include<windows.h>
    #include<string>
    #include<cstring>
    #include<string.h>
    #include<map>
    #include<winresrc.h>
    using namespace std;
    int main(){
    return 0;
    }
    

    192.168.26.182

    www.luogu.com.cn

    
    

    递归函数w(x,y,z)递归函数w(x,y,z)

    #include<bits/stdc++.h>
    using namespace std;
    long long x,y,z,ans=0,ANS[114][114][114];
    long long w(int x,int y,int z){//递归函数
    if(x<=0||y<=0||z<=0)//递归边界
    return 1;//返回值
    else if(x>20||y>20||z>20){//第二个递归条件
    ans=w(20,20,20);
    return ans;//返回值
    }
    if(ANS[x][y][z])	return ANS[x][y][z];//我不理解
    else if(x<y&&y<z){//第三个递归条件
    return ANS[x][y][z]=w(x,y,z-1)+w(x,y-1,z-1)-w(x,y-1,z);//第三个递归语句
    }
    else{//第四个递归条件
    return ANS[x][y][z]=w(x-1,y,z)+w(x-1,y-1,z)+w(x-1,y,z-1)-w(x-1,y-1,z-1);
    }//第四个递归语句
    }
    int main(){
    while(scanf("%lld%lld%lld",&x,&y,&z)!=-1){//多组数据
    if(x==-1&&y==-1&&z==-1) return 0;//结束条件
    printf("w(%lld,%lld,%lld)=%lld\n",x,y,z,w(x,y,z));//输出结果
    }
    return 0;
    }
    
  • 通过的题目

  • 最近活动

    This person is lazy and didn't join any contests or homework.
  • 最近编写的题解

    This person is lazy and didn't write any solutions.
  • Stat

  • Rating

题目标签

系统测试
1