文章列表
 
您正在查看 "排序" 分类下的文章

2010-03-06 19:11

//二维数组的排序问题

#include <iostream>
#include <algorithm>
using namespace std;
const int maxn = 10001;
int num[maxn];
struct node
{
int a[5];
}adj[maxn];
int n;
int tot, highest;
int cmp(node a, node b)
{
int i, j;
for (i=0; i<5; i++)
{
       if(a.a[i]!=b.a[i])
     return a.a[i]<b.a[i];//返回后一数组的字典序比前一数组的字典序大

 
 
   
 
 
文章存档
 
     
 
最新文章评论
  

条理很清晰
 

什么是多重队列?跪求!!!
 

orz ...
 

请问这个代码,错在什么地方了?一直是 running time error 我是不是少考虑了什么条
 

#include<iostream> #include<algorithm> #include<string.h> using namespace std;
   
帮助中心 | 空间客服 | 投诉中心 | 空间协议
©2012 Baidu