随笔分类 - 算法题
摘要:输入:n——点的个数,a:double的点的角度。 1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <iostream> 4 #include <vector> 5 #include <array> 6 #include <list> 7
阅读全文
摘要:1 int main(int argc, char** argv) 2 { 3 4 5 int array[] = { 1,2,1,4 }; 6 int top = 0, second = 1; 7 for (size_t i = 1; i < 4; i++) 8 { 9 if (array[i] < array[top]) ...
阅读全文
摘要:转自:http://blog.csdn.net/no_retreats/article/details/8146585定义一个二维数组:int maze[5][5] = { 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, ...
阅读全文