头文件
/**
* 功能:下推栈(push_down stack)不会越出内存
* 时间:2014年8月18日08:13:36
* 作者:cutter_point
*/
#ifndef STACK_H_INCLUDED
#define STACK_H_INCLUDED
struct Stack
{
struct Link
{
void* data; //这个结构...
分类:
编程语言 时间:
2014-08-18 09:18:33
阅读次数:
326
/**
* 功能:用sizeof运算符可以确定struct的长度。
* 时间:2014年8月18日08:10:14
* 作者:cutter_point
*/
#include"CLib.h"
#include"CppLib.h"
#include
using namespace std;
struct A
{
int i[100];
};
struct B
{
void f...
分类:
编程语言 时间:
2014-08-18 09:18:23
阅读次数:
204
数组是二等公民,不能进行整体赋值,或者参数传递,或者作为返回值。But!如果封装在struct内部,就完全不一样了 1 #include 2 using namespace std; 3 4 struct s_tag { int a[100]; }; 5 s_tag fa, sa, ua; 6 .....
分类:
其他好文 时间:
2014-08-18 08:02:43
阅读次数:
220
通讯录中的一条记录包含下述基本信息:朋友的姓名、出生日期、性别、固定电话号码、移动电话号码。本题要求编写程序,录入N条记录,并且根据要求显示任意某条记录。输入格式: 输入在第1行给出正整数N(#includetypedef struct{ char name[11]; char birthday.....
分类:
其他好文 时间:
2014-08-18 04:55:03
阅读次数:
217
题目连接:uva 684 - Integral Determinant
题目大意:给定一个行列式,求行列式的值。
解题思路:将行列式转化成上三角的形式,值即为对角线上元素的积。因为要消元,又是整数,所以用分数去写了。
#include
#include
#include
using namespace std;
typedef long long type;
struct...
分类:
其他好文 时间:
2014-08-18 01:35:03
阅读次数:
250
二叉树的创建。这里采用最简单的情况,创建完全二叉树,用数组来保存: 1 struct TreeNode 2 { 3 int val; 4 TreeNode *left, *right; 5 TreeNode(int x): val(x), left(NULL), right(...
分类:
其他好文 时间:
2014-08-18 01:30:03
阅读次数:
332
1 #include 2 #include 3 using namespace std; 4 5 template 6 class Heap { 7 public: 8 Heap():n(0), capacity(100) { 9 this->ar...
分类:
其他好文 时间:
2014-08-18 01:28:33
阅读次数:
323
1.如何确定数据库是否启动
su - oracle
ps -ef |grep ora_|head -2
两种关系数据库是ora或者是自动存储管理的asm开头的,
查看进程可以知道数据库实例至少已经启动,但是数据库是否挂载,是否打开,不得而知
asm
crs_stat -t
updb.db online
srvctl status database -d updb
db
...
分类:
数据库 时间:
2014-08-18 00:18:03
阅读次数:
503
HDU 4957 Poor Mitsui
题目链接
思路:利用辗转相除法去贪心即可,注意容积为0的情况,这是个坑点
代码:
#include
#include
#include
using namespace std;
const int N = 45;
struct SB {
int a, b;
} sb[N];
bool cmp(SB x, SB y...
分类:
其他好文 时间:
2014-08-17 22:49:02
阅读次数:
227
典型的Joseph问题……由于数据范围小,直接暴力就可以解决了……用到了链表的数据结构……时间:90毫秒。#include "stdio.h"#include "string.h"struct lianbiao{ int prev,next;}p[152];const int INF=2147483...
分类:
其他好文 时间:
2014-08-17 21:15:32
阅读次数:
158