一元多项式相加减(数据结构)

/*
  Name: 类C通用模块 
  Copyright: BTC 2004
  Author: Zhuang Bo
  Date: 2004
  Description:  
    [Constants]
       TRUE/FALSE/OK/ERROR/INFEASIBLE/DS_OVERFLOW      
    [Types]  
       Status      
    [Functions]
       max(a,b)
       min(a,b)
       read(char/int/float/double/char*)
       write(char/int/float/double/char*)
*/

#ifndef _DS_H_
#define _DS_H_

// 函数结果状态代码
const int TRUE      = 1;
const int FALSE     = 0;
const int OK        = 1;
const int ERROR     = 0;
const int INFEASIBLE    = -1;
const int DS_OVERFLOW      = -2;

// Status 是函数的类型,其值是函数结果状态代码
typedef int Status;

//基本函数
#define max(a,b) (((a)<(b))?(b):(a)) 
#define min(a,b) (((a)<(b))?(a):(b))

#include <stdio.h>
//不用格式串的输入输出(目的是为了方便书写算法)
//    比如输入一个基本类型(char, int, float, double, char*)的
//    变量 x,可以直接用 read(x);输入,而打印则用 write(x);。 
//    对于自定义类型,可以继续扩充。
inline void readM(char& e)     { getchar(); e = getchar(); }
inline void read(char& e)     {  e = getchar(); }
inline void read(int& e)      { scanf("%d", &e); }
inline void read(float& e)    { scanf("%f", &e); }
inline void read(double& e)   { scanf("%lf", &e); }
inline void read(
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值