📄 decconquer.h
字号:
#ifndef DECCONPUER_H
#define DECCONPUER_H
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <time.h>
#include <limits.h>
#include <math.h>
#define MAX_COIN 100 //the max of coin quantity
typedef struct{
int weigth; //the weight of every coin
int index;
}Coin,*Coins;
//Comparing the weight of two piles of coins
//Input: Two piles of coins A and B
// return 0 if the piles weith the same,
//-1 if A is lighter the B, 1 if A is not lighter than B
int Compare(Coin A[],Coin [],int len);
//Detecting the fake coin from A
//Input: an array A that record the weigth of each coin
//Output: coin record fake coin in the array A of loacation and weight
void FakeCoin(Coins A,int num,Coin *coin);
//Atuo-generate weight
void AutoWeight(Coins *A,int *num);
//
void Output(Coins A);
//
void DecStart();
//Copy the Array A of the elements into array S
ArrayCopy(Coins S,const Coins A,int start,int end);
#endif DECCONPUER_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -