PAT A1052Linked List Sorting(测试点3:输出首节点地址时也要保证格式)

#include 
#include 
#include 
using namespace std;
#define MAX 100010
struct node
{
   
	int add;
	int key;
	int next;
	int flag;
};
bool cmp(node a, node b)
{
   
	return a.key < b.key;
}
int main()
{
   
	int n, first;
	cin >> n >> first;
	int i,x;
	node *s = new node[MAX];
	

你可能感兴趣的:(PAT,PAT,真题,静态链表)