#include<stdio.h>
#include<stdlib.h>
typedef struct binarytree
{
int data;
struct binarytree *lchild;
struct binarytree *parent;
struct binarytree *rchild;
}BT;
BT * init_bt()
{
BT *tree=(BT *)malloc(sizeof(BT));
tree->parent=NULL;
tree->lchild=NULL;
tree->rchild=NULL;...
问题描述:火车分n小节,从头开始进站出站,有可能的顺序
#include<fstream>
#include<sstream>
#include<iostream>
#include<stack>
using namespace std;
int main(){
ifstream in("rail.txt");
for(int n,line=0;in>>n&&n&&in.ignore();){
cout<<(line++ ? "\n":"");
for(string s;getline(in...
#include<stdio.h>
#include<stdlib.h>
#include<malloc.h>
#include<string.h>
typedef struct node
{
int i;
int j;
float value;
struct node *down;
struct node *right;
}NODE,*NODEP;
typedef struct matrix
{
int m;int n;int t;
NODEP *row;
NODE...