- 博客(46)
- 资源 (5)
- 收藏
- 关注
原创 PAT 甲级 1042 Shuffling Machine (20 分)(简单题)
1042Shuffling Machine(20分)Shuffling is a procedure used to randomize a deck of playing cards. Because standard shuffling techniques are seen as weak, and in order to avoid "...
          2019-08-31 12:48:00
           383
383
        
原创 PAT 甲级 1041 Be Unique (20 分)(简单,一遍过)
1041Be Unique(20分)Being unique is so important to people on Mars that even their lottery is designed in a unique way. The rule of winning is simple: one bets on a numb...
          2019-08-31 11:15:00
           228
228
        
原创 PAT 甲级 1040 Longest Symmetric String (25 分)(字符串最长对称字串,遍历)
1040Longest Symmetric String(25分)Given a string, you are supposed to output the length of the longest symmetric sub-string. For example, givenIs PAT&TAP symmetric?, the...
          2019-08-31 09:36:00
           242
242
        
原创 PAT 甲级 1039 Course List for Student (25 分)(字符串哈希,优先队列,没想到是哈希)*...
1039Course List for Student(25分)Zhejiang University has 40000 students and provides 2500 courses. Now given the student name lists of all the courses, you are supposed to ou...
          2019-08-30 17:38:00
           234
234
        
原创 PAT 甲级 1038 Recover the Smallest Number (30 分)(思维题,贪心)
1038Recover the Smallest Number(30分)Given a collection of number segments, you are supposed to recover the smallest number from them. For example, given { 32, 321, 3214, 022...
          2019-08-29 16:59:00
           275
275
        
原创 PAT 甲级 1037 Magic Coupon (25 分) (较简单,贪心)
1037Magic Coupon(25分)The magic shop in Mars is offering some magic coupons. Each coupon has an integerNprinted on it, meaning that when you use this coupon with a product,...
          2019-08-29 16:16:00
           314
314
        
原创 PAT 甲级 1036 Boys vs Girls (25 分)(简单题)
1036Boys vs Girls(25分)This time you are asked to tell the difference between the lowest grade of all the male students and the highest grade of all the female students.Inp...
          2019-08-27 20:42:00
           277
277
        
原创 PAT 甲级 1035 Password (20 分)(简单题)
1035Password(20分)To prepare for PAT, the judge sometimes has to generate random passwords for the users. The problem is that there are always some confusing passwords since ...
          2019-08-27 19:57:00
           254
254
        
原创 PAT 甲级 1034 Head of a Gang (30 分)(bfs,map,强连通)
1034Head of a Gang(30分)One way that the police finds the head of a gang is to check people's phone calls. If there is a phone call betweenAandB,...
          2019-08-27 16:48:00
           382
382
        
原创 PAT 甲级 1033 To Fill or Not to Fill (25 分)(贪心,误以为动态规划,忽视了油量问题)*...
1033To Fill or Not to Fill(25分)With highways available, driving a car from Hangzhou to any other city is easy. But since the tank capacity of a car is l...
          2019-08-26 19:41:00
           247
247
        
原创 Python SciPy库——插值与拟合
插值与拟合原文链接:https://zhuanlan.zhihu.com/p/281491951.最小二乘拟合实例1# -*- coding: utf-8 -*-import numpy as npimport matplotlib.pyplot as pltfrom scipy.optimize import leastsq## 设置...
          2019-08-24 15:35:00
           2206
2206
        
原创 matlab学习——05插值和拟合(黄河小浪底调水调沙问题)
05插值和拟合黄河小浪底调水调沙问题data3.txt1800 1900 2100 2200 2300 2400 2500 2600 2650 2700 2720 265032 60 75 85 90 98 100 102 108 112 ...
          2019-08-24 15:19:00
           10000
10000
           2
2
        
原创 PAT 甲级 1032 Sharing (25 分)(结构体模拟链表,结构体的赋值是深拷贝)
1032Sharing(25分)To store English words, one method is to use linked lists and store a word letter by letter. To save some space, we may ...
          2019-08-23 14:21:00
           259
259
        
原创 PAT 甲级 1031 Hello World for U (20 分)(一开始没看懂题意)
1031Hello World for U(20分)Given any string ofN(≥) characters, you are asked to form the characters into the shape ofU. For example,helloworldcan be ...
          2019-08-23 13:32:00
           186
186
        
原创 matlab学习——05插值和拟合(一维二维插值,拟合)
05插值和拟合1.一维插值(1) 机床加工零件,试用分段线性和三次样条两种插值方法计算。并求x=0处的曲线斜率和13<=x<=15范围内y的最小值。x0=[0 3 5 7 9 11 12 13 14 15];y0=[0 1.2 1.7 2 2.1 2.0 1.8 1.2 1.0 1.6];x=0:0.1:15;% interp1现有插值函数,要求x...
          2019-08-22 19:05:00
           1285
1285
        
原创 matlab学习——04图与网络(最短路,最小生成树,最大流)
04图与网络1.最短路(1) 自己写的dijstra算法format compact;clc,clear alla=zeros(6);a(1,2)=50;a(1,4)=40;a(1,5)=25;a(1,6)=10;a(2,3)=15;a(2,4)=20;a(2,6)=25;a(3,4)=10;a(3,5)=20;a(4,5)=10;a(4,6...
          2019-08-22 15:51:00
           2535
2535
           1
1
        
原创 matlab学习——02整数规划(蒙特卡洛法,指派问题,混合整数规划)
02整数规划蒙特卡洛法(随机取样法)编写文件mengte.m,目标函数f和约束向量gfunction[f,g]=mengte(x);f=x(1)^2+x(2)^2+3*x(3)^2+4*x(4)^2+2*x(5)^2-8*x(1)-2*x(2)-3*x(3)-x(4)-... 2*x(5);g=[ sum(x)-400 x(1)...
          2019-08-22 15:39:00
           2055
2055
        
原创 matlab学习——01线性规划
01线性规划format compact;% min fx% Ax<=b% Aeq*x=beq% lb<=x<=ub%% max z=2x1+3x2-5x3% x1+x2+x3=7% 2x1-5x2+x3>=10% x1+3x2+x3<=12% x1,x2,x3>=0f=[-2;3;5];a=...
          2019-08-22 15:31:00
           1578
1578
        
原创 MATLAB常用快捷键总结
MATLAB 命令栏显示处理的常用命令清屏:clc紧凑显示格式:formatcompact宽松显示格式:formatloose数据高精度显示:formatlongG数据低精度显示:format short编辑器窗口(Editor)下的常用快捷键:自动对齐程序(整理缩进)-自动整理代码 用鼠标选中代码行,按Ctrl + I (我一般先 Ctrl+A...
          2019-08-21 17:38:00
           1943
1943
        
原创 Python动态展示遗传算法求解TSP旅行商问题(转载)
版权声明:本文为博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。本文链接:https://blog.csdn.net/jiang425776024/article/details/84532018效果图:程序会动态的展示迭代过程,40以内城市大概迭代300次能收敛到最优;这里是用中国城市地理坐标直接做欧式距离计算,实际上可以根据问题...
          2019-08-21 16:25:00
           869
869
        
原创 Python动态展示遗传算法求解TSP旅行商问题()
版权声明:本文为博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。本文链接:https://blog.csdn.net/jiang425776024/article/details/84532018效果图:程序会动态的展示迭代过程,40以内城...
          2019-08-21 16:25:00
           437
437
           1
1
        
原创 sklearn常见分类器(二分类模板)
# -*- coding: utf-8 -*-import pandas as pdimport matplotlibmatplotlib.rcParams['font.sans-serif']=[u'simHei']matplotlib.rcParams['axes.unicode_minus']=Falsefrom sklearn.tree import De...
          2019-08-20 21:37:00
           2140
2140
        
原创 python图论包networks(最短路,最小生成树带包)
官方文档:https://networkx.github.io/documentation/networkx-1.10/reference/algorithms.html最短路和最小生成树:import networkx as nximport matplotlib.pyplot as pltG = nx.Graph()#G.add_node(...
          2019-08-20 18:20:00
           1491
1491
        
原创 PAT 甲级 1030 Travel Plan (30 分)(dijstra,较简单,但要注意是从0到n-1)
1030Travel Plan(30分)A traveler's map gives the distances between cities along the highways, together with the cost of each highway. Now you are suppos...
          2019-08-19 21:00:00
           264
264
        
原创 PAT 甲级 1029 Median (25 分)(思维题,找两个队列的中位数,没想到)*
1029Median(25分)Given an increasing sequence S of N integers, the median is the number at the middle position. For example, the medi...
          2019-08-18 14:43:00
           189
189
        
原创 PAT 甲级 1028 List Sorting (25 分)(排序,简单题)
1028List Sorting(25分)Excel can sort records according to any column. Now you are supposed to imitate this function.Input Specification:Eac...
          2019-08-18 13:59:00
           175
175
        
原创 PAT 甲级 1027 Colors in Mars (20 分)(简单,进制转换)
1027Colors in Mars(20分)People in Mars represent the colors in their computers in a similar way as the Earth people. That is, a color is repr...
          2019-08-18 13:47:00
           101
101
        
原创 PAT 甲级 1026 Table Tennis (30 分)(坑点很多,逻辑较复杂,做了1天)
1026Table Tennis(30分)A table tennis club has N tables available to the public. The tables are numbered from 1 to N. For any pair of players, if there are some tables open wh...
          2019-08-18 13:31:00
           228
228
        
原创 PAT 甲级1025 PAT Ranking (25 分)(结构体排序,第一次超时了,一次sort即可小技巧优化)...
题意:给定一次PAT测试的成绩,要求输出考生的编号,总排名,考场编号以及考场排名。分析: 题意很简单嘛,一开始上来就,一组组输入,一组组排序并记录组内排名,然后再来个总排序并算总排名,结果发现最后一个测试点超时。 发现自己一开始太傻太盲目,其实只要一次性全部输进来,记录好考场编号,一次排序就可以了。既然只排了一次,怎么计算考场排名呢,这里我用了三个数组...
          2019-08-15 22:53:00
           215
215
        
原创 PAT 甲级 1024 Palindromic Number (25 分)(大数加法,考虑这个数一开始是不是回文串)...
1024Palindromic Number(25分)A number that will be the same when it is written forwards or backwards is known as aPalindromic Number. For example, 12343...
          2019-08-15 22:08:00
           264
264
        
原创 PAT 甲级 1023 Have Fun with Numbers (20 分)(permutation是全排列题目没读懂)
1023Have Fun with Numbers(20分)Notice that the number 123456789 is a 9-digit number consisting exactly the numbers from 1 to 9, with no duplication. Double it we will obtain 246913578, ...
          2019-08-15 09:39:00
           183
183
        
原创 PAT 甲级 1022 Digital Library (30 分)(字符串读入getline,istringstream,测试点2时间坑点)...
1022Digital Library(30分)A Digital Library contains millions of books, stored according to their titles, authors, key words of their abstracts, publishers, and published years. Each book ...
          2019-08-12 15:23:00
           305
305
           1
1
        
原创 用Keras搭建神经网络 简单模版(六)——Autoencoder 自编码
import numpy as npnp.random.seed(1337)from keras.datasets import mnistfrom keras.models import Modelfrom keras.layers import Dense, Inputimport matplotlib.pyplot as plt(x_train,y_train),(x_...
          2019-08-11 22:38:00
           355
355
        
原创 PAT 甲级 1021 Deepest Root (25 分)(bfs求树高,又可能存在part数part>2的情况)
1021Deepest Root(25分)A graph which is connected and acyclic can be considered a tree. The height of the tree depends on the selected root. Now you are supposed to find the root that re...
          2019-08-11 19:28:00
           219
219
        
原创 PAT 甲级 1020 Tree Traversals (25 分)(二叉树已知后序和中序建树求层序)
1020Tree Traversals(25分)Suppose that all the keys in a binary tree are distinct positive integers. Given the postorder and inorder traversal sequences, you are supposed to output the l...
          2019-08-10 22:31:00
           229
229
        
原创 PAT 甲级 1019 General Palindromic Number (进制转换,vector运用,一开始2个测试点没过)...
1019General Palindromic Number(20分)A number that will be the same when it is written forwards or backwards is known as aPalindromic Number. For example, 1234321 is a palindromic numbe...
          2019-08-09 22:03:00
           187
187
        
原创 PAT 甲级 1018 Public Bike Management (30 分)(dijstra+dfs,dfs记录路径,做了两天)
1018Public Bike Management(30分)There is a public bike service in Hangzhou City which provides great convenience to the tourists from all over the world. One may rent a bike at any stat...
          2019-08-09 00:28:00
           227
227
        
原创 用Keras搭建神经网络 简单模版(五)——RNN LSTM Regressor 循环神经网络
# -*- coding: utf-8 -*-import numpy as npnp.random.seed(1337)import matplotlib.pyplot as pltfrom keras.models import Sequentialfrom keras.layers import LSTM,TimeDistributed,Densefrom keras.op...
          2019-08-06 19:38:00
           392
392
        
原创 用Keras搭建神经网络 简单模版(四)—— RNN Classifier 循环神经网络(手写数字图片识别)...
# -*- coding: utf-8 -*-import numpy as npnp.random.seed(1337)from keras.datasets import mnistfrom keras.utils import np_utilsfrom keras.models import Sequentialfrom keras.layers import Simpl...
          2019-08-06 16:31:00
           407
407
        
原创 PAT 甲级 1017 Queueing at Bank (25 分)(模拟题,有点思维小技巧,第二次做才理清思路)...
1017Queueing at Bank(25分)Suppose a bank hasKwindows open for service. There is a yellow line in front of the windows which devides the waiting area into two parts. All the customers ha...
          2019-08-05 22:56:00
           139
139
        
基于OpenCV的人脸识别-python3.zip
2019-07-07
webjsp期末大作业-教务选课管理系统.zip
2019-07-07
         
      
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
 RSS订阅
RSS订阅