文章
7
粉丝
254
获赞
6
访问
84.9k
 
分类讨论
先剔除A B C有0的情况
再分2类,让A < B,为了方便
C < A < B(可以直接口算结果)
A < C < B(C倒A分类,C倒B可以口算结果)
A < B < C(稍微麻烦)
#include
#include
using namespace std;
const int maxn = 4010;
int ans[maxn] = {0};
int A, B, C;
int flag[maxn] = {0};
void start(){
    if(C == 0){
        printf("1\n");
        return;
    }
    if(A == 0 && B == 0){
        printf("1\n");
        return;
    }
    
    if(A == 0 || B == 0){
        printf("2\n");
        return;
    }
    
    if(A > B){
        int temp = A;
        A = B;
    &nb...
登录后发布评论
暂无评论,来抢沙发