利用结构体编写的两人对战小游戏,代码及简要分析如下 1 public struct Fighter 2 { 3 public string name; 4 public int blood; 5 ...
分类:
其他好文 时间:
2014-08-30 01:11:18
阅读次数:
320
题目来源:POJ 1442 Black Box
题意:输入xi 输出前xi个数的第i大的数
思路:试了下自己的treap模版
#include
#include
#include
#include
using namespace std;
struct Node
{
Node *ch[2];
int r;
int v;
int s;
Node(){}
Node(int ...
分类:
其他好文 时间:
2014-08-30 00:04:28
阅读次数:
282
题目链接
题意:求n^n的个位数的值。
思路:快速幂求值
代码:
#include
#include
#include
#include
#include
using namespace std;
typedef long long ll;
ll a, b, n, m;
struct mat{
ll s[2][2];
mat() {...
分类:
Web程序 时间:
2014-08-29 22:41:18
阅读次数:
229
#include #include#define ElemType char//节点声明,数据域、左孩子指针、右孩子指针typedef struct BiTNode{ char data; struct BiTNode *lchild,*rchild;}BiTNode,*BiTree;/...
分类:
其他好文 时间:
2014-08-29 22:30:48
阅读次数:
320
eXosip2 INVITE and Call Management SIP messages and call control API Functions int eXosip_call_set_reference (struct eXosip_t *excontext, int id, void...
分类:
其他好文 时间:
2014-08-29 20:00:48
阅读次数:
607
eXosip2 configuration API General purpose API. Data Structures struct eXosip_dns_cache struct eXosip_tls_credentials_s struct eXosip_tls_ctx_s Macros ...
eXosip2 event API General purpose API. Data Structures struct eXosip_event Enumerations enum eXosip_event_type { EXOSIP_REGISTRATION_SUCCESS, EXOSIP_R...
#include
#include
#include
#include
#include
#include
using namespace std;
#define Max(x,y) ((x)>(y)?(x):(y))
#define ABS(x) ((x)>0?(x):-(x))
struct Node{
Node* l,*r;
int val,h;
Node(int x){
l=r=...
分类:
其他好文 时间:
2014-08-29 18:25:38
阅读次数:
210
这个程序从终端读入内容,而后按照lua块执行。
#include
#include
#include "lua.h"
#include "lauxlib.h"
#include "lualib.h"
int main(){
char buff[1024];
int error;
memset(buff, 0, sizeof(buff));
lua_Stat...
分类:
其他好文 时间:
2014-08-29 18:23:18
阅读次数:
314
//对战游戏 struct duizhan { public string name; public int xue; public int gongji; public int fangyu; public int mingzhong; public int shengfa; } static ....
分类:
其他好文 时间:
2014-08-29 17:52:58
阅读次数:
225