#include
#include
#include
using namespace std;
const int MAXSIZE = 100;
typedef struct
{
string address;///??
int x;
string next;///????
}info;
typedef struct
{
info data[MAXSIZE];
int length;
}SeqList,*pSeqList;
pSeqList initSeqList()
{
pSeqList L = (pSeqList)malloc(sizeof(SeqList));
L->length = 0;
return L;
}
int main()
{
string first;
int len,cnt;
cin >> first >> len >> cnt;
pSeqList PL = initSeqList();
for (int i = 0;i < len;i++)
{
cin >> PL->data[i].address >> PL->data[i].x >> PL->data[i].next;
}
for (int i = 0;i < len;i++)
{
cout << PL->data[i].address << ends << PL->data[i].x << ends << PL->data[i].next << endl;
}
return 0;
}
测试数据:
00100 6 4
00000 4 99999
00100 1 12309
68237 6 -1
33218 3 00000
99999 5 68237
12309 2 33218