随笔分类 - algorithm
摘要:网址:http://poj.org/problem?id=1007首先定义一个字符串大小的概念:右边的字母小于前边字母的数量。给定多组字符串,按照大小顺序输出。用到的方法:排序算法首先需要排序,然后对排序后得到的index进行以下的处理index_1[index[i]]=i;最终得到输出。Sampl...
阅读全文
摘要:Color Me Less:http://poj.org/problem?id=1046类似于最近邻算法,距离采用传统的欧式距离。用到的算法:寻找最小元素以下是c语言实现/****************************************************************...
阅读全文
摘要:基本原理在代码中有注释: 1 #include 2 #include 3 #include 4 #include 5 #include 6 using std::string; 7 8 struct Position 9 { 10 string EID; 11 ...
阅读全文