NFC PN532模块 TgInitAsTarget命令设置成目标不成功

pn532工具检测不到设备，求解决方案
pn532连接后，设备管理器显示设备运转正常，但是在打开pn532工具后检测不到设备，是电脑问题还是……

Common Polynomial 程序的实现
Problem Description Math teacher Mr. Matsudaira is teaching expansion and factoring of polynomials to his students. Last week he instructed the students to write two polynomials (with a single variable x), and to report GCM (greatest common measure) of them as a homework, but he found it boring to check their answers manually. So you are asked to write a program to check the answers. Hereinafter, only those polynomials with integral coefficients, called integral polynomials, are considered. When two integral polynomials A and B are given, an integral polynomial C is a common factor of A and B if there are some integral polynomials X and Y such that A = CX and B = CY . GCM of two integral polynomials is a common factor which has the highest degree (for x, here); you have to write a program which calculates the GCM of two polynomials. It is known that GCM of given two polynomials is unique when constant multiplication factor is ignored. That is, when C and D are both GCM of some two polynomials A and B, p×C = q×D for some nonzero integers p and q. Input The input consists of multiple datasets. Each dataset constitutes a pair of input lines, each representing a polynomial as an expression defined below. 1. A primary is a variable x, a sequence of digits 0 – 9, or an expression enclosed within (· · · ). Examples: x, 99, (x+1). 2. A factor is a primary by itself or a primary followed by an exponent. An exponent consists of a symbol ^ followed by a sequence of digits 0 – 9. Examples: x^05, 1^15, (x+1)^3. 3. A term consists of one or more adjoining factors. Examples: 4x, (x+1)(x-2), 3(x+1)^2. 4. An expression is one or more terms connected by either + or -. Additionally, the first term of an expression may optionally be preceded with a minus sign -. Examples: -x+1,3(x+1)^2-x(x-1)^2. Integer constants, exponents, multiplications (adjoining), additions (+) and subtractions/negations (-) have their ordinary meanings. A sequence of digits is always interpreted as an integer constant. For example, 99 means 99, not 9 × 9. Any subexpressions of the input, when fully expanded normalized, have coefficients less than 100 and degrees of x less than 10. Digit sequences in exponents represent non-zero values. All the datasets are designed so that a standard algorithm with 32-bit two’s complement integers can solve the problem without overflows. The end of the input is indicated by a line containing a period. Output For each of the dataset, output GCM polynomial expression in a line, in the format below. c0x^p0 ± c1x^p1 · · · ± cnx^pn Where ci and pi (i = 0, . . . , n) are positive integers with p0 > p1 > · · · > pn, and the greatest common divisor of {ci | i = 0; · · · ; n} is 1. Additionally: 1. When ci is equal to 1, it should be omitted unless corresponding pi is 0, 2. x^0 should be omitted as a whole, and 3. x^1 should be written as x. Sample Input -(x^3-3x^2+3x-1) (x-1)^2 x^2+10x+25 x^2+6x+5 x^3+1 x-1 . Sample Output x^2-2x+1 x+5 1
Common Polynomial
Problem Description Math teacher Mr. Matsudaira is teaching expansion and factoring of polynomials to his students. Last week he instructed the students to write two polynomials (with a single variable x), and to report GCM (greatest common measure) of them as a homework, but he found it boring to check their answers manually. So you are asked to write a program to check the answers. Hereinafter, only those polynomials with integral coefficients, called integral polynomials, are considered. When two integral polynomials A and B are given, an integral polynomial C is a common factor of A and B if there are some integral polynomials X and Y such that A = CX and B = CY . GCM of two integral polynomials is a common factor which has the highest degree (for x, here); you have to write a program which calculates the GCM of two polynomials. It is known that GCM of given two polynomials is unique when constant multiplication factor is ignored. That is, when C and D are both GCM of some two polynomials A and B, p×C = q×D for some nonzero integers p and q. Input The input consists of multiple datasets. Each dataset constitutes a pair of input lines, each representing a polynomial as an expression defined below. 1. A primary is a variable x, a sequence of digits 0 – 9, or an expression enclosed within (· · · ). Examples: x, 99, (x+1). 2. A factor is a primary by itself or a primary followed by an exponent. An exponent consists of a symbol ^ followed by a sequence of digits 0 – 9. Examples: x^05, 1^15, (x+1)^3. 3. A term consists of one or more adjoining factors. Examples: 4x, (x+1)(x-2), 3(x+1)^2. 4. An expression is one or more terms connected by either + or -. Additionally, the first term of an expression may optionally be preceded with a minus sign -. Examples: -x+1,3(x+1)^2-x(x-1)^2. Integer constants, exponents, multiplications (adjoining), additions (+) and subtractions/negations (-) have their ordinary meanings. A sequence of digits is always interpreted as an integer constant. For example, 99 means 99, not 9 × 9. Any subexpressions of the input, when fully expanded normalized, have coefficients less than 100 and degrees of x less than 10. Digit sequences in exponents represent non-zero values. All the datasets are designed so that a standard algorithm with 32-bit two’s complement integers can solve the problem without overflows. The end of the input is indicated by a line containing a period. Output For each of the dataset, output GCM polynomial expression in a line, in the format below. c0x^p0 ± c1x^p1 · · · ± cnx^pn Where ci and pi (i = 0, . . . , n) are positive integers with p0 > p1 > · · · > pn, and the greatest common divisor of {ci | i = 0; · · · ; n} is 1. Additionally: 1. When ci is equal to 1, it should be omitted unless corresponding pi is 0, 2. x^0 should be omitted as a whole, and 3. x^1 should be written as x. Sample Input -(x^3-3x^2+3x-1) (x-1)^2 x^2+10x+25 x^2+6x+5 x^3+1 x-1 . Sample Output x^2-2x+1 x+5 1

CARDS 的问题
Description Alice and Bob have a set of N cards labelled with numbers 1 ... N (so that no two cards have the same label) and a shuffle machine. We assume that N is an odd integer. The shuffle machine accepts the set of cards arranged in an arbitrary order and performs the following operation of double shuffle : for all positions i, 1 <= i <= N, if the card at the position i is j and the card at the position j is k, then after the completion of the operation of double shuffle, position i will hold the card k. Alice and Bob play a game. Alice first writes down all the numbers from 1 to N in some random order: a1, a2, ..., aN. Then she arranges the cards so that the position ai holds the card numbered ai+1, for every 1 <= i <= N-1, while the position aN holds the card numbered a1. This way, cards are put in some order x1, x2, ..., xN, where xi is the card at the ith position. Now she sequentially performs S double shuffles using the shuffle machine described above. After that, the cards are arranged in some final order p1, p2, ..., pN which Alice reveals to Bob, together with the number S. Bob's task is to guess the order x1, x2, ..., xN in which Alice originally put the cards just before giving them to the shuffle machine. Input The first line of the input contains two integers separated by a single blank character : the odd integer N, 1 <= N <= 1000, the number of cards, and the integer S, 1 <= S <= 1000, the number of double shuffle operations. The following N lines describe the final order of cards after all the double shuffles have been performed such that for each i, 1 <= i <= N, the (i+1)st line of the input file contains pi (the card at the position i after all double shuffles). Output The output should contain N lines which describe the order of cards just before they were given to the shuffle machine. For each i, 1 <= i <= N, the ith line of the output file should contain xi (the card at the position i before the double shuffles). Sample Input 7 4 6 3 1 2 4 7 5 Sample Output 4 7 5 6 1 2 3
Age of the Great Voyages 旅行的问题
Problem Description "Age of the Great Voyages", which is also called "Uncharted Waters", is an old PC-game telling an interesting story in the period between the 15-th century and the 17-th century, when European explorers sailed the seas to open new alternative ways to Asia when the Ottoman Empire blocked the land routes. The story evolves on the search of the seven "Proof of the Conqueror", which are seven ancient artifacts, in seven areas around the world (Northern Europe, Mediterranean, Africa, New World, Indian Ocean, South Asia and East Asia). It is said that having these proofs proves that the sailor is the champion of all sailors. Four sailors unwittingly involved in the struggle of the quest of the search of the Proof of the Conqueror. - from wikipedia Li Huamei, an Admiral of Ming Dynasty, is one of the four protagonists in the story. She trys to find the "Proof of the Conqueror" for the revitalization of the motherland. One person's power is limited, so she searches for like-minded people to help her. When Li's fleet voyages to the New World, she meets an intelligent man - Fernandes and invite him to become a member of the fleet as a staff officer. While Fernandes is a strange man, he requires that he will join only if Li can win in the following game: At the beginning, there are N piles of coins on the desk, the i-th pile has Pi coins. Then Fernandes and Li take turns to take coins from those piles on the desk according to the following rule: when it is someone's turn to take coins, at first, he/she has to select no more than K (and no less than 1) piles that still have coins arbitrarily, then take arbitrary number (at least 1) of coins from each piles he/she selects. The game is over until all coins are taken, and the winer is the person who takes the last coin. Fernandes is very familiar with this game, and Li is also very clever. So you can assume that both of them know the best strategy to win the game. Now we know the situation at the beginning, and that Fernandes takes coins first. The question is who will win the game? Input The first line of the input is a single integer T, representing the number of test cases. Then the description of these T test cases follows. The first line of each test cases has two integers: N and K, and in the second line there are N positive integers P1, P2, ..., PN givin the number of coins in each pile at the beginning. 1 ≤ N ≤ 10000 0 ≤ Pi ≤ 2147483647 Output For each test case, if Fernandes can win the game, output "Fernandes wins"; otherwise output "Li wins" in a single line. Sample Input 3 15 4 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3 1 4 12 8 3 2 23 12 8 Sample Output Li wins Li wins Fernandes wins
Common Polynomial 代码编写问题
Problem Description Math teacher Mr. Matsudaira is teaching expansion and factoring of polynomials to his students. Last week he instructed the students to write two polynomials (with a single variable x), and to report GCM (greatest common measure) of them as a homework, but he found it boring to check their answers manually. So you are asked to write a program to check the answers. Hereinafter, only those polynomials with integral coefficients, called integral polynomials, are considered. When two integral polynomials A and B are given, an integral polynomial C is a common factor of A and B if there are some integral polynomials X and Y such that A = CX and B = CY . GCM of two integral polynomials is a common factor which has the highest degree (for x, here); you have to write a program which calculates the GCM of two polynomials. It is known that GCM of given two polynomials is unique when constant multiplication factor is ignored. That is, when C and D are both GCM of some two polynomials A and B, p×C = q×D for some nonzero integers p and q. Input The input consists of multiple datasets. Each dataset constitutes a pair of input lines, each representing a polynomial as an expression defined below. 1. A primary is a variable x, a sequence of digits 0 – 9, or an expression enclosed within (· · · ). Examples: x, 99, (x+1). 2. A factor is a primary by itself or a primary followed by an exponent. An exponent consists of a symbol ^ followed by a sequence of digits 0 – 9. Examples: x^05, 1^15, (x+1)^3. 3. A term consists of one or more adjoining factors. Examples: 4x, (x+1)(x-2), 3(x+1)^2. 4. An expression is one or more terms connected by either + or -. Additionally, the first term of an expression may optionally be preceded with a minus sign -. Examples: -x+1,3(x+1)^2-x(x-1)^2. Integer constants, exponents, multiplications (adjoining), additions (+) and subtractions/negations (-) have their ordinary meanings. A sequence of digits is always interpreted as an integer constant. For example, 99 means 99, not 9 × 9. Any subexpressions of the input, when fully expanded normalized, have coefficients less than 100 and degrees of x less than 10. Digit sequences in exponents represent non-zero values. All the datasets are designed so that a standard algorithm with 32-bit two’s complement integers can solve the problem without overflows. The end of the input is indicated by a line containing a period. Output For each of the dataset, output GCM polynomial expression in a line, in the format below. c0x^p0 ± c1x^p1 · · · ± cnx^pn Where ci and pi (i = 0, . . . , n) are positive integers with p0 > p1 > · · · > pn, and the greatest common divisor of {ci | i = 0; · · · ; n} is 1. Additionally: 1. When ci is equal to 1, it should be omitted unless corresponding pi is 0, 2. x^0 should be omitted as a whole, and 3. x^1 should be written as x. Sample Input -(x^3-3x^2+3x-1) (x-1)^2 x^2+10x+25 x^2+6x+5 x^3+1 x-1 . Sample Output x^2-2x+1 x+5 1

The shortest path 最短路径问题
Problem Description There are n points on the plane, Pi(xi, yi)(1 <= i <= n), and xi < xj (i<j). You begin at P1 and visit all points then back to P1. But there is a constraint: Before you reach the rightmost point Pn, you can only visit the points those have the bigger x-coordinate value. For example, you are at Pi now, then you can only visit Pj(j > i). When you reach Pn, the rule is changed, from now on you can only visit the points those have the smaller x-coordinate value than the point you are in now, for example, you are at Pi now, then you can only visit Pj(j < i). And in the end you back to P1 and the tour is over. You should visit all points in this tour and you can visit every point only once. Input The input consists of multiple test cases. Each case begins with a line containing a positive integer n(2 <= n <= 200), means the number of points. Then following n lines each containing two positive integers Pi(xi, yi), indicating the coordinate of the i-th point in the plane. Output For each test case, output one line containing the shortest path to visit all the points with the rule mentioned above.The answer should accurate up to 2 decimal places. Sample Input 3 1 1 2 3 3 1 Sample Output 6.47

http://www.shtdsc.com/i/shtdsc/jglb?pn=2&ps=10 这个网站可以在浏览器打开，但是使用requests返回的数据不对 返回的代码是202 ``` url = 'http://www.shtdsc.com/i/shtdsc/jglb?pn=2&ps=10' # url = 'http://www.shtdsc.com/2016/tdjy/dkjs/' headers ={ 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3', 'Accept-Encoding': 'gzip, deflate', 'Accept-Language': 'zh-CN,zh;q=0.9', 'Cache-Control': 'max-age=0', 'Connection': 'keep-alive', 'Cookie': 'FSSBBIl1UgzbN7N80S=v5II3Ox4RUr46cw9mUaKp54cxsPxuL8u_JTfDG9DQV9ySF5uLGO4pH.i4pDquL0D; Hm_lvt_e951494076936a1cbdeaac613f3da44f=1578880532; Hm_lpvt_e951494076936a1cbdeaac613f3da44f=1578884586; FSSBBIl1UgzbN7Nenable=true; FSSBBIl1UgzbN7N80T=4hKEIXlAKI6wgL1WMPAxyS_behWrgdkeGu4fk7sB_7AQWawhqATZMuTis80M9U.tgS_D4Yx8u8jyTPlNcVS60RKKKccAxIN9TY0E9RaejTF9E08fWKl07oiCgOTKpXvOaEnqvClOamVJdLVJXRoyt5wHXjbzBpuzqTzZcUFOScPFqE.RaqPGDpOPszwkJkwfGBIFt1w5m.alQ7WGZkjWyH_Nxc6hTp735HU4Yr8jhrXgXGXHYjzwNPzzwJp37JUWpRsOIPqG6T8JOun5fdRV9YZMil2Z2bSt38.tjvRwWaVGsL.POjI4Mq.RLHOd7EuekG.DwODiBSgsOD3TcENWV6t3uStrN.gj4cHhL1vYBqjO0m22zkYAthgZmyEj0ugmekH9', 'Host': 'www.shtdsc.com', 'Upgrade-Insecure-Requests': '1', "User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.108 Safari/537.36", } resp = requests.get(url=url,headers=headers) print(resp) ``` 求大神帮忙解决，十万火急！
A high-dimensional problem
Problem Description As we all know, a point in n-dimensional space can be represented as a vector (x1, x2, ..., xn), where xi is a real number. Given a vector D = (d1, d2, ..., dn), we can generate a series of planes perpendicular to D: each plane satisfies the condition that for any two point on the plane, say A = (a1, a2, ..., an), B = (b1, b2, ..., bn), the inner product of (A - B) and D is zero, ie. (a1 - b1) * d1 + (a2 - b2) * d2 + ... + (an - bn) * dn = 0, and we call D the normal vector of the plane. let A * B denotes the inner product of A and B. Here are n planes in n-dimensional space: S1, S2, ..., Sn with normal vector D1, D2, ..., Dn respectively. And P1, P2, ..., Pn lies on S1, S2,..., Sn respectively. We don't know the coordinates of P1, P2, ..., Pn, but instead we know D1 * P1, D2 * D2, ..., Dn * Pn. Can we find out the point of intersection of S1, S2, ..., Sn? Input There will be multiple test cases. Each data set will be formatted according to the following description: 1. A line containing two integers n, m, 3 <= n <= 100, 1 <= m <= n, m represents the number of queries to the same D1, D2, ..., Dn. 2. line 1 + i(1 <= i <= n) : n real number denoting the coordinates of Di. 3. line 1 + n + i(1 <= i <= m): n real number denoting D1 * P1, D2 * P2, ..., Dn * Pn. Output For each test data, there will be exactly m lines. For each query output a line containing the coordinates of the point of intersetion of S1, S2, ..., Sn.Round all the coordinates to the second digit after the decimal point.You may assume there will always be exactly one such point Sample Input 3 1 1 0 0 0 1 0 0 0 1 1 1 1 Sample Output 1.00 1.00 1.00
Age of the Great Voyages
Problem Description "Age of the Great Voyages", which is also called "Uncharted Waters", is an old PC-game telling an interesting story in the period between the 15-th century and the 17-th century, when European explorers sailed the seas to open new alternative ways to Asia when the Ottoman Empire blocked the land routes. The story evolves on the search of the seven "Proof of the Conqueror", which are seven ancient artifacts, in seven areas around the world (Northern Europe, Mediterranean, Africa, New World, Indian Ocean, South Asia and East Asia). It is said that having these proofs proves that the sailor is the champion of all sailors. Four sailors unwittingly involved in the struggle of the quest of the search of the Proof of the Conqueror. - from wikipedia Li Huamei, an Admiral of Ming Dynasty, is one of the four protagonists in the story. She trys to find the "Proof of the Conqueror" for the revitalization of the motherland. One person's power is limited, so she searches for like-minded people to help her. When Li's fleet voyages to the New World, she meets an intelligent man - Fernandes and invite him to become a member of the fleet as a staff officer. While Fernandes is a strange man, he requires that he will join only if Li can win in the following game: At the beginning, there are N piles of coins on the desk, the i-th pile has Pi coins. Then Fernandes and Li take turns to take coins from those piles on the desk according to the following rule: when it is someone's turn to take coins, at first, he/she has to select no more than K (and no less than 1) piles that still have coins arbitrarily, then take arbitrary number (at least 1) of coins from each piles he/she selects. The game is over until all coins are taken, and the winer is the person who takes the last coin. Fernandes is very familiar with this game, and Li is also very clever. So you can assume that both of them know the best strategy to win the game. Now we know the situation at the beginning, and that Fernandes takes coins first. The question is who will win the game? Input The first line of the input is a single integer T, representing the number of test cases. Then the description of these T test cases follows. The first line of each test cases has two integers: N and K, and in the second line there are N positive integers P1, P2, ..., PN givin the number of coins in each pile at the beginning. 1 ≤ N ≤ 10000 0 ≤ Pi ≤ 2147483647 Output For each test case, if Fernandes can win the game, output "Fernandes wins"; otherwise output "Li wins" in a single line. Sample Input 3 15 4 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3 1 4 12 8 3 2 23 12 8 Sample Output Li wins Li wins Fernandes wins
The shortest path 是如何解答的
Problem Description There are n points on the plane, Pi(xi, yi)(1 <= i <= n), and xi < xj (i<j). You begin at P1 and visit all points then back to P1. But there is a constraint: Before you reach the rightmost point Pn, you can only visit the points those have the bigger x-coordinate value. For example, you are at Pi now, then you can only visit Pj(j > i). When you reach Pn, the rule is changed, from now on you can only visit the points those have the smaller x-coordinate value than the point you are in now, for example, you are at Pi now, then you can only visit Pj(j < i). And in the end you back to P1 and the tour is over. You should visit all points in this tour and you can visit every point only once. Input The input consists of multiple test cases. Each case begins with a line containing a positive integer n(2 <= n <= 200), means the number of points. Then following n lines each containing two positive integers Pi(xi, yi), indicating the coordinate of the i-th point in the plane. Output For each test case, output one line containing the shortest path to visit all the points with the rule mentioned above.The answer should accurate up to 2 decimal places. Sample Input 3 1 1 2 3 3 1 Sample Output 6.47 Hint: The way 1 - 3 - 2 - 1 makes the shortest path.
MATLAB智能算法第29个案例报错
%% 清空环境变量 clear all clc %% 导入数据 load concrete_data.mat % 随机产生训练集和测试集 n = randperm(size(attributes,2)); % 训练集——80个样本 p_train = attributes(:,n(1:80))'; t_train = strength(:,n(1:80))'; % 测试集——23个样本 p_test = attributes(:,n(81:end))'; t_test = strength(:,n(81:end))'; %% 数据归一化 % 训练集 [pn_train,inputps] = mapminmax(p_train'); pn_train = pn_train'; pn_test = mapminmax('apply',p_test',inputps); pn_test = pn_test'; % 测试集 [tn_train,outputps] = mapminmax(t_train'); tn_train = tn_train'; tn_test = mapminmax('apply',t_test',outputps); tn_test = tn_test'; %% SVM模型创建/训练 % 寻找最佳c参数/g参数 [c,g] = meshgrid(-10:0.5:10,-10:0.5:10); [m,n] = size(c); cg = zeros(m,n); eps = 10^(-4); v = 5; bestc = 0; bestg = 0; error = Inf; for i = 1:m for j = 1:n cmd = ['-v ',num2str(v),' -t 2',' -c ',num2str(2^c(i,j)),' -g ',num2str(2^g(i,j) ),' -s 3 -p 0.1']; cg(i,j) = svmtrain(tn_train,pn_train,cmd); if cg(i,j) < error error = cg(i,j); bestc = 2^c(i,j); bestg = 2^g(i,j); end if abs(cg(i,j) - error) <= eps && bestc > 2^c(i,j) error = cg(i,j); bestc = 2^c(i,j); bestg = 2^g(i,j); end end end % 创建/训练SVM cmd = [' -t 2',' -c ',num2str(bestc),' -g ',num2str(bestg),' -s 3 -p 0.01']; model = svmtrain(tn_train,pn_train,cmd); %% SVM仿真预测 [Predict_1,error_1] = svmpredict(tn_train,pn_train,model); [Predict_2,error_2] = svmpredict(tn_test,pn_test,model); % 反归一化 predict_1 = mapminmax('reverse',Predict_1,outputps); predict_2 = mapminmax('reverse',Predict_2,outputps); % 结果对比 result_1 = [t_train predict_1]; result_2 = [t_test predict_2]; %% 绘图 figure(1) plot(1:length(t_train),t_train,'r-*',1:length(t_train),predict_1,'b:o') grid on legend('真实值','预测值') xlabel('样本编号') ylabel('耐压强度') string_1 = {'训练集预测结果对比'; ['mse = ' num2str(error_1(2)) ' R^2 = ' num2str(error_1(3))]}; title(string_1) figure(2) plot(1:length(t_test),t_test,'r-*',1:length(t_test),predict_2,'b:o') grid on legend('真实值','预测值') xlabel('样本编号') ylabel('耐压强度') string_2 = {'测试集预测结果对比'; ['mse = ' num2str(error_2(2)) ' R^2 = ' num2str(error_2(3))]}; title(string_2) %% BP 神经网络 % 数据转置 pn_train = pn_train'; tn_train = tn_train'; pn_test = pn_test'; tn_test = tn_test'; % 创建BP神经网络 net = newff(pn_train,tn_train,10); % 设置训练参数 net.trainParam.epcohs = 1000; net.trainParam.goal = 1e-3; net.trainParam.show = 10; net.trainParam.lr = 0.1; % 训练网络 net = train(net,pn_train,tn_train); % 仿真测试 tn_sim = sim(net,pn_test); % 均方误差 E = mse(tn_sim - tn_test); % 决定系数 N = size(t_test,1); R2=(N*sum(tn_sim.*tn_test)-sum(tn_sim)*sum(tn_test))^2/((N*sum((tn_sim).^2)-(sum(tn_sim))^2)*(N*sum((tn_test).^2)-(sum(tn_test))^2)); % 反归一化 t_sim = mapminmax('reverse',tn_sim,outputps); % 绘图 figure(3) plot(1:length(t_test),t_test,'r-*',1:length(t_test),t_sim,'b:o') grid on legend('真实值','预测值') xlabel('样本编号') ylabel('耐压强度') string_3 = {'测试集预测结果对比(BP神经网络)'; ['mse = ' num2str(E) ' R^2 = ' num2str(R2)]}; title(string_3) 错误使用svmtrain（line233） Y must be a vector or a character array. 出错 main(line 48) cg (i,j)=svmtrain (tr_train,pn_train,cmd);我源码没改过，是不是因为版本的不同？我用的是2014a
Decode the Strings 字符串的解码
Problem Description Bruce Force has had an interesting idea how to encode strings. The following is the description of how the encoding is done: Let x1,x2,...,xn be the sequence of characters of the string to be encoded. 1. Choose an integer m and n pairwise distinct numbers p1,p2,...,pn from the set {1, 2, ..., n} (a permutation of the numbers 1 to n). 2. Repeat the following step m times. 3. For 1 ≤ i ≤ n set yi to xpi, and then for 1 ≤ i ≤ n replace xi by yi. For example, when we want to encode the string "hello", and we choose the value m = 3 and the permutation 2, 3, 1, 5, 4, the data would be encoded in 3 steps: "hello" -> "elhol" -> "lhelo" -> "helol". Bruce gives you the encoded strings, and the numbers m and p1, ..., pn used to encode these strings. He claims that because he used huge numbers m for encoding, you will need a lot of time to decode the strings. Can you disprove this claim by quickly decoding the strings? Input The input contains several test cases. Each test case starts with a line containing two numbers n and m (1 ≤ n ≤ 80, 1 ≤ m ≤ 109). The following line consists of n pairwise different numbers p1,...,pn (1 ≤ pi ≤ n). The third line of each test case consists of exactly n characters, and represent the encoded string. The last test case is followed by a line containing two zeros. Output For each test case, print one line with the decoded string. Sample Input 5 3 2 3 1 5 4 helol 16 804289384 13 10 2 7 8 1 16 12 15 6 5 14 3 4 11 9 scssoet tcaede n 8 12 5 3 4 2 1 8 6 7 encoded? 0 0 Sample Output hello second test case encoded?
R语言中for循环与图片变量的问题

[OJ题][TLE][C语言]关于整数数列的任意连续子数列快速遍历出现TLE的解决方案

130 个相见恨晚的超实用网站，一次性分享出来

win10系统安装教程（U盘PE+UEFI安装）

Python——画一棵漂亮的樱花树（不同种樱花+玫瑰+圣诞树喔）

《奇巧淫技》系列-python！！每天早上八点自动发送天气预报邮件到QQ邮箱

Ol4网格生成以及优化

11月19日科技资讯|华为明日发布鸿蒙整体战略；京东宣告全面向技术转型；Kotlin 1.3.60 发布
「极客头条」—— 技术人员的新闻圈！ CSDN 的读者朋友们早上好哇，「极客头条」来啦，快来看今天都有哪些值得我们技术人关注的重要新闻吧。扫描上方二维码进入 CSDN App 可以收听御姐萌妹 Style 的人工版音频哟。 一分钟速览新闻点！ 6G 专家组成员：速率是 5G 的 10 至 100 倍，预计 2030 年商用 雷军：很多人多次劝我放弃WPS，能坚持下来并不是纯粹的商业决定 ...
C语言魔塔游戏

iOS Bug 太多，苹果终于坐不住了！

Python语言高频重点汇总
Python语言高频重点汇总 GitHub面试宝典仓库 回到首页 目录： Python语言高频重点汇总 目录： 1. 函数-传参 2. 元类 3. @staticmethod和@classmethod两个装饰器 4. 类属性和实例属性 5. Python的自省 6. 列表、集合、字典推导式 7. Python中单下划线和双下划线 8. 格式化字符串中的%和format 9. 迭代器和生成器 10...

Python爬虫爬取淘宝，京东商品信息

Java工作4年来应聘要16K最后没要,细节如下。。。

2020年，冯唐49岁：我给20、30岁IT职场年轻人的建议

1、骇客帝国(1999) 概念：在线/离线，递归，循环，矩阵等 剧情简介： 不久的将来，网络黑客尼奥对这个看似正常的现实世界产生了怀疑。 他结识了黑客崔妮蒂，并见到了黑客组织的首领墨菲斯。 墨菲斯告诉他，现实世界其实是由一个名叫“母体”的计算机人工智能系统控制，人们就像他们饲养的动物，没有自由和思想，而尼奥就是能够拯救人类的救世主。 可是，救赎之路从来都不会一帆风顺，到底哪里才是真实的世界？如何...

CPU对每个程序员来说，是个既熟悉又陌生的东西？ 如果你只知道CPU是中央处理器的话，那可能对你并没有什么用，那么作为程序员的我们，必须要搞懂的就是CPU这家伙是如何运行的，尤其要搞懂它里面的寄存器是怎么一回事，因为这将让你从底层明白程序的运行机制。 随我一起，来好好认识下CPU这货吧 把CPU掰开来看 对于CPU来说，我们首先就要搞明白它是怎么回事，也就是它的内部构造，当然，CPU那么牛的一个东...
@程序员，如何花式构建线程？

Linux自学篇——linux命令英文全称及解释
man: Manual 意思是手册，可以用这个命令查询其他命令的用法。 pwd：Print working directory 意思是密码。 su：Swith user 切换用户，切换到root用户 cd：Change directory 切换目录 ls：List files 列出目录下的文件 ps：Process Status 进程状态 mkdir：Make directory ...
Python实战：抓肺炎疫情实时数据，画2019-nCoV疫情地图