Django+nginx服务器搭建纪要

配置及需要: 阿里云学生机 Ubuntu16.04 Python3.5 Django2.0 nginx uwsgi 1. 切换python版本 1.1 安装python3,设置python3为默认 Django2.0需要python3,而Ubuntu默认python版本为2.7,因此需要修改p...

2019-04-27 20:46:44

阅读数 8

评论数 0

PAT A1051 Pop Sequence(25 分)

解题思路 按序读取所给的序列 若读入的数字大于当前栈内最大数,则逐1进栈,直到和所读数相等; 判断栈大小是否超过限制,注意此时栈顶元素不计数; 若读入的数字小于当前栈内最大数,则逐1出栈,直到栈顶和所读数相等; 若一轮循环后,栈大小超过限制或栈内仍有数字,则不能得到此序列。 // 考试版 ...

2018-09-02 22:48:22

阅读数 31

评论数 0

PAT 最小路径题 Dijkstra+DFS模板

可用于求解最短路径问题,以及一些存在第二第三标尺,需要遍历路径的问题。 #include <cstdio> #include <vector> #include <cstring&...

2018-09-01 23:53:44

阅读数 49

评论数 0

PAT 1072 Gas Station(30 分)

记录以字符串形式读入,再转换为数字 n间房子,m个气站,共n+m个点 循环Dijkstra得出 Gi 的最短距离,枚举判断是否有房子超过了覆盖范围,同时计算最小距离和平均距离 题设要求的是求最小距离中的最大值 #include <cstdio>...

2018-09-01 23:43:46

阅读数 49

评论数 0

PAT 1021 Deepest Root 25

A graph which is connected and acyclic can be considered a tree. The hight of the tree depends on the selected root. Now you are supposed to find the...

2018-08-28 01:04:39

阅读数 36

评论数 0

图的一般算法(伪代码)

1。广度优先搜索(BFS) bool visited[Max_vertex_num]; void BEFTraverse(Graph G) { for (int i = 0; i < G.vexnum; ++i)...

2018-08-16 20:42:09

阅读数 648

评论数 0

PAT A1055 The World's Richest (25)

Forbes magazine publishes every year its list of billionaires based on the annual ranking of the world’s wealthiest people. Now you are supposed to s...

2018-08-09 19:52:06

阅读数 29

评论数 0

PAT A1037 Magic Coupon (25)

The magic shop in Mars is offering some magic coupons. Each coupon has an integer N printed on it, meaning that when you use this coupon with a produ...

2018-08-09 00:11:20

阅读数 30

评论数 0

PAT A1067 Sort with Swap(0,*) (25)

Given any permutation of the numbers {0, 1, 2,…, N-1}, it is easy to sort them in increasing order. But what if Swap(0, *) is the ONLY operation that...

2018-08-09 00:04:34

阅读数 19

评论数 0

PAT A1089 Insert or Merge(25 分)

According to Wikipedia: Insertion sort iterates, consuming one input element each repetition, and growing a sorted output list. Each iteration, inse...

2018-08-05 16:02:06

阅读数 76

评论数 0

CodeUp 递归小结 1903、2018、2044、2046(未完)

题目描述 名名的妈妈从外地出差回来,带了一盒好吃又精美的巧克力给名名(盒内共有 N 块巧克力,20 > N >0)。 妈妈告诉名名每天可以吃一块或者两块巧克力。 假设名名每天都吃巧克力,问名名共有多少种不同的吃完巧克...

2018-08-04 00:36:27

阅读数 50

评论数 0

PAT A1095 Cars on Campus (30)

Zhejiang University has 6 campuses and a lot of gates. From each gate we can collect the in/out times and the plate numbers of the cars crossing the ...

2018-08-03 16:21:21

阅读数 31

评论数 0

PAT A1080 Graduate Admission (30)

It is said that in 2013, there were about 100 graduate schools ready to proceed over 40,000 applications in Zhejiang Province. It would help a lot if...

2018-08-03 12:09:55

阅读数 37

评论数 0

PAT A1083 List Grades(25 分)

Given a list of N student records with name, ID and grade. You are supposed to sort the records with respect to the grade in non-increasing order, an...

2018-08-02 14:51:50

阅读数 29

评论数 0

PAT A1029 Median(25 分)AC代码 成功解决内存超限 PAT已修复问题

Given an increasing sequence S of N integers, the median is the number at the middle position. For example, the median of S1 = { 11, 12, 13, 14 } is ...

2018-08-02 08:27:01

阅读数 686

评论数 0

提示
确定要删除当前文章?
取消 删除
关闭
关闭