hi3559深度学习问题，大家有遇到的吗

```void sanjitutai::OnTimer(UINT_PTR nIDEvent) { switch (nIDEvent) { case DealData_timer://每秒一次的处理 DealData(); /*KillTimer(DealData_timer);*/ break; case BatteryData_timer: //每分钟一次的处理 ReadBattery(); /* KillTimer(BatteryData_timer);*/ break; default: ; } CDialog::OnTimer(nIDEvent); } BOOL sanjitutai::ReadBattery() { HANDLE hI2C; // I2C设备操作号 I2C_TRANSACTION_INFO i2cInfo; byte InBuffer = 0 ; hI2C = I2C_Open(L"I2C1:"); if(hI2C == INVALID_HANDLE_VALUE) { printf("Open I2C Device fail!\r\n"); I2C_Close(hI2C); return 0; } I2C_Close(hI2C); return 0; } ```
Walk 旅行的问题
Problem Description Alice would like to visit Bob. However, they live in a hilly landscape, and Alice doesn’t like to walk in hills. She has a map of the area, showing the height curves. You have to calculate the total altitude climbed, and the total altitude descended, for the route which minimizes these numbers. It does not matter how far she has to walk to achieve this. Since you don’t know what the landscape looks like in between the height curves, you cannot know exactly how much climb and descent she will actually get in practice, but you should calculate the minimum possible under optimal conditions based on what you can deduce from the map. The map is represented as an xy grid. Alice lives in (0, 0), and Bob lives in (100 000, 0). The height curves are represented as polygons, where a polygon cannot intersect itself or another polygon. Furthermore, neither Alice nor Bob lives exactly on a height curve. Second test case from sample input (compressed). Input On the first line one positive number: the number of testcases, at most 100. After that per testcase: One line with 0 ≤ N ≤ 2 500, the number of height curves. One line for each height curve, with 1 ≤ Hi ≤ 1 000 being the height of the curve, 3 ≤ Pi ≤ 2 000 the number of vertices in the polygon, and the vertices x1, y1, …, xPi, yPi having integral values &#8722;300 000 ≤ xi, yi ≤ 300 000. There will be no more than 200 000 polygon vertices in total in all test cases. Output Per testcase: One line with two numbers: the total altitude climbed and the total altitude descended. Sample Input 2 2 20 3 10 10 0 -10 -10 10 25 3 20 20 0 -20 -20 20 3 100 4 -1 1 1 1 1 -1 -1 -1 300 8 -2 2 2 2 2 -2 5 -2 5 1 6 1 6 -3 -2 -3 50 8 3 3 100001 3 100001 -1 7 -1 7 2 4 2 4 -1 3 -1 Sample Output 5 0 200 250 Source

Cycling 的寻找问题
Problem Description You want to cycle to a programming contest. The shortest route to the contest might be over the tops of some mountains and through some valleys. From past experience you know that you perform badly in programming contests after experiencing large differences in altitude. Therefore you decide to take the route that minimizes the altitude difference, where the altitude difference of a route is the difference between the maximum and the minimum height on the route. Your job is to write a program that finds this route. You are given: the number of crossings and their altitudes, and the roads by which these crossings are connected. Your program must find the route that minimizes the altitude difference between the highest and the lowest point on the route. If there are multiple possibilities, choose the shortest one. For example: In this case the shortest path from 1 to 7 would be through 2, 3 and 4, but the altitude difference of that path is 8. So, you prefer to go through 5, 6 and 4 for an altitude difference of 2. (Note that going from 6 directly to 7 directly would have the same difference in altitude, but the path would be longer!) Input On the first line an integer t (1 <= t <= 100): the number of test cases. Then for each test case: One line with two integers n (1 <= n <= 100) and m (0 <= m <= 5000): the number of crossings and the number of roads. The crossings are numbered 1..n. n lines with one integer hi (0 <= hi <= 1 000 000 000): the altitude of the i-th crossing. m lines with three integers aj , bj (1 <= aj , bj <= n) and cj (1 <= cj <= 1 000 000): this indicates that there is a two-way road between crossings aj and bj of length cj . You may assume that the altitude on a road between two crossings changes linearly. You start at crossing 1 and the contest is at crossing n. It is guaranteed that it is possible to reach the programming contest from your home. Output For each testcase, output one line with two integers separated by a single space: the minimum altitude difference, and the length of shortest path with this altitude difference. Sample Input 1 7 9 4 9 1 3 3 5 4 1 2 1 2 3 1 3 4 1 4 7 1 1 5 4 5 6 4 6 7 4 5 3 2 6 4 2 Sample Output 2 11
Rolling Hongshu 是怎么写的
Problem Description To see his girl friend, sweet potato has to go over thousands of mountains. What make things worse, many bitter potatoes lives in these mountains. They hate sweet potato because they don't have girl friends. In the world of potatoes, friction force does not exist. So the way potatoes travel is very simple: they start with an initial speed, rolling forward and waiting to get to the destination. Bitter potatoes lived in different places. When sweet potato rolls passing their home, they begin to chase him (surely by rolling with an initial speed). If sweet potato is caught by a bitter potato, his date with girl friend has to be canceled. Now sweet potato wants to know the minimum initial speed necessary to see his girl friend. Input First line is an integer T (T ≤ 50), the number of test cases. At the beginning of each case is three integers, N, M and w, indicate the number of peaks in the mountains, the number of bitter potatoes and the weight of sweet potato separately. 2 ≤ N ≤ 1000, 0 ≤ M ≤ 1000, 0 < w < 100000. The next N lines each contain a pair of integers. Each pair of integers xi, hi describe a peak. xi is the horizontal distant between sweet potato's home and the peak. hi is the height of the peak. All xi are different. 0 = x1 < x2 < … < xn ≤ 100000000, -100000000 ≤ hi ≤ 100000000. Between adjacent peaks is a smooth slope. The bitter potatoes are on these slopes. The following M lines each contain 3 integers. Each triple of integers pi, vi, mi describe a bitter potato. pi is the horizontal distant between his home and sweet potato’s home. vi is his initial speed. mi is his weight. 0 < pi < xn, 0 ≤ vi ≤ 100000000, 0 < mi < 100000 The gravitational constant in potatoes' world is 20. Sweet potato's home is at point (x1, h1). His girl friend lives at point (xn, hn). Output For each case, you should output “Case k: ” first. Following a number, the lower bound of sweet potato's initial speed rounded to two decimal places. Sample Input 1 6 2 100 0 0 2 5 3 2 4 1 5 3 8 -2 2 15 100 5 11 100 Sample Output Case 1: 20.62
S-Nim 的问题
Obfuscation 的问题怎么做
Problem Description It is a well-known fact that if you mix up the letters of a word, while leaving the first and last letters in their places, words still remain readable. For example, the sentence “tihs snetncee mkaes prfecet sesne”, makes perfect sense to most people. If you remove all spaces from a sentence, it still remains perfectly readable, see for example: “thissentencemakesperfectsense”, however if you combine these two things, first shuffling, then removing spaces, things get hard. The following sentence is harder to decipher: “tihssnetnceemkaesprfecetsesne”. You’re given a sentence in the last form, together with a dictionary of valid words and are asked to decipher the text. Input On the first line one positive number: the number of testcases, at most 100. After that per testcase: One line with a string s: the sentence to decipher. The sentence consists of lowercase letters and has a length of at least 1 and at most 1 000 characters. One line with an integer n with 1 ≤ n ≤ 10 000: the number of words in the dictionary. n lines with one word each. A word consists of lowercase letters and has a length of at least 1 and at most 100 characters. All the words are unique. Output Per testcase: One line with the deciphered sentence, if it is possible to uniquely decipher it. Otherwise “impossible” or “ambiguous”, depending on which is the case. Sample Input 3 tihssnetnceemkaesprfecetsesne 5 makes perfect sense sentence this hitehre 2 there hello hitehre 3 hi there three Sample Output this sentence makes perfect sense impossible ambiguous
Catch The Heart 的计算
Problem Description Do you know Popeye? He likes spinach(菠菜) very much. Maybe you have played some games about him. Now here comes one game. There are many boards, on one board there is a heart, Popeye wants to catch the heart and send it to his GF, Oliver, so that, she will be happy. At the beginning, Popeye is on one board, and the heart is on another board. Every board is described as h, l, and r, the height, the left end and the right end. You can look it as a line (l, h) (r, h) in XY coordinate system. Popeye can walk on the board, jump from one board to another. Notes: 1.He can walk on a board 1 unit per second. 2.He can only jump vertically(垂直地), and it takes 1s for each jumping. 3.He can jump only 1 unit high, so that he can jump only if the difference of the boards’ height is 1. 4.He can only jump up to the left or right point of the board. 5.He can only jump down from the left or right point of the board. You can look the picture: The problem is, find the shortest time to catch the heart. Input The first line of the input contains an integer T (T <= 20) which means the number of test cases. For each case, first line is an integer m (2 <= m <= 10000) which means the number of the boards. Then comes two lines, the first line contains h0, l0, r0, p0 (l0 <= p0 <= r0), which mean the information of the board and the position that the heart on it. Next line contains h1, l1, r1, p1 (l1 <= p1 <= r1), which mean the information of the board and the position that Popeye on it. Then comes m-2 lines, each contains hi, li, ri mean the ith (2 <= i < m) board’s information. There is no common point or common parts for every two boards. All inputs are integers, for each board, 0 <= h <= 10000, 0 <= l < r <= 100000000. Output For each case, output the shortest time to catch the heart if Popeye can catch it, otherwise output -1. Sample Input 3 3 3 4 5 5 1 0 10 0 4 1 2 2 1 1 99999999 1 0 0 100000000 100000000 5 4 0 5 0 0 0 5 0 1 5 10 2 6 15 3 5 10 Sample Output -1 100000000 24
Hi3518ev300 在HI_MIPI_ENABLE_SENSOR_CLOCK 时失败，报错：__osal_unlocked_ioctl - Input param err,it is null!

Matrix Chain Multiplication 编写
Problem Description Matrix multiplication problem is a typical example of dynamical programming. Suppose you have to evaluate an expression like A*B*C*D*E where A,B,C,D and E are matrices. Since matrix multiplication is associative, the order in which multiplications are performed is arbitrary. However, the number of elementary multiplications needed strongly depends on the evaluation order you choose. For example, let A be a 50*10 matrix, B a 10*20 matrix and C a 20*5 matrix. There are two different strategies to compute A*B*C, namely (A*B)*C and A*(B*C). The first one takes 15000 elementary multiplications, but the second one only 3500. Your job is to write a program that determines the number of elementary multiplications needed for a given evaluation strategy. Input Input consists of two parts: a list of matrices and a list of expressions. The first line of the input file contains one integer n (1 <= n <= 26), representing the number of matrices in the first part. The next n lines each contain one capital letter, specifying the name of the matrix, and two integers, specifying the number of rows and columns of the matrix. The second part of the input file strictly adheres to the following syntax (given in EBNF): SecondPart = Line { Line } <EOF> Line = Expression <CR> Expression = Matrix | "(" Expression Expression ")" Matrix = "A" | "B" | "C" | ... | "X" | "Y" | "Z" Output For each expression found in the second part of the input file, print one line containing the word "error" if evaluation of the expression leads to an error due to non-matching matrices. Otherwise print one line containing the number of elementary multiplications needed to evaluate the expression in the way specified by the parentheses. Sample Input 9 A 50 10 B 10 20 C 20 5 D 30 35 E 35 15 F 15 5 G 5 10 H 10 20 I 20 25 A B C (AA) (AB) (AC) (A(BC)) ((AB)C) (((((DE)F)G)H)I) (D(E(F(G(HI))))) ((D(EF))((GH)I)) Sample Output 0 0 0 error 10000 error 3500 15000 40500 47500 15125
Walk 的代码的编写和设计
Problem Description Alice would like to visit Bob. However, they live in a hilly landscape, and Alice doesn’t like to walk in hills. She has a map of the area, showing the height curves. You have to calculate the total altitude climbed, and the total altitude descended, for the route which minimizes these numbers. It does not matter how far she has to walk to achieve this. Since you don’t know what the landscape looks like in between the height curves, you cannot know exactly how much climb and descent she will actually get in practice, but you should calculate the minimum possible under optimal conditions based on what you can deduce from the map. The map is represented as an xy grid. Alice lives in (0, 0), and Bob lives in (100 000, 0). The height curves are represented as polygons, where a polygon cannot intersect itself or another polygon. Furthermore, neither Alice nor Bob lives exactly on a height curve. Second test case from sample input (compressed). Input On the first line one positive number: the number of testcases, at most 100. After that per testcase: One line with 0 ≤ N ≤ 2 500, the number of height curves. One line for each height curve, with 1 ≤ Hi ≤ 1 000 being the height of the curve, 3 ≤ Pi ≤ 2 000 the number of vertices in the polygon, and the vertices x1, y1, …, xPi, yPi having integral values &#8722;300 000 ≤ xi, yi ≤ 300 000. There will be no more than 200 000 polygon vertices in total in all test cases. Output Per testcase: One line with two numbers: the total altitude climbed and the total altitude descended. Sample Input 2 2 20 3 10 10 0 -10 -10 10 25 3 20 20 0 -20 -20 20 3 100 4 -1 1 1 1 1 -1 -1 -1 300 8 -2 2 2 2 2 -2 5 -2 5 1 6 1 6 -3 -2 -3 50 8 3 3 100001 3 100001 -1 7 -1 7 2 4 2 4 -1 3 -1 Sample Output 5 0 200 250 Source
HI3518ev300 HI_MPI_VPSS_SetExtChnAttr 失败 0xA0078003，报错参数设置无
``` /******************************************************************************* *@ Description :配置VPSS的扩展通道 *@ Input :<vpssGrp>:组号 <vpssChn>：扩展通道号 <bindChn>：绑定到目标物理通道号 <width>：扩展通道图片的宽 <height>：扩展通道图片的高 <frmRate>扩展通道图片的帧率 *@ Output : *@ Return :成功：0 失败：错误码 *@ attention :该接口在H3518ev300（hi3516ev200）的SDK中设置不正常 *******************************************************************************/ static int vpss_config_ext_chn(VPSS_GRP vpssGrp, VPSS_CHN vpssChn, VPSS_CHN bindChn, int width, int height, int frmRate) { int ret; VPSS_EXT_CHN_ATTR_S extAttr = {0}; /*---#------------------------------------------------------------*/ printf("----ExtChnAttr:-----------------------------------------\n"); printf("extAttr.s32BindChn = %d\n",extAttr.s32BindChn); printf("extAttr.u32Width = %d\n",extAttr.u32Width); printf("extAttr.u32Height = %d\n",extAttr.u32Height); printf("extAttr.enVideoFormat = %d\n",extAttr.enVideoFormat); printf("extAttr.enPixelFormat = %d\n",extAttr.enPixelFormat); printf("extAttr.enDynamicRange = %d\n",extAttr.enDynamicRange); printf("extAttr.enCompressMode = %d\n",extAttr.enCompressMode); printf("extAttr.u32Depth = %d\n",extAttr.u32Depth); printf("extAttr.stFrameRate.s32SrcFrameRate = %d\n",extAttr.stFrameRate.s32SrcFrameRate); printf("extAttr.stFrameRate.s32DstFrameRate = %d\n",extAttr.stFrameRate.s32DstFrameRate); printf("-------------------------------------------------------\n"); /*---#------------------------------------------------------------*/ extAttr.s32BindChn = bindChn; extAttr.u32Width = width;//960; extAttr.u32Height = height;//540; extAttr.enVideoFormat = VIDEO_FORMAT_LINEAR; extAttr.enPixelFormat = PIXEL_FORMAT_YUV_SEMIPLANAR_420; extAttr.enDynamicRange = DYNAMIC_RANGE_SDR8; extAttr.enCompressMode = COMPRESS_MODE_NONE; extAttr.u32Depth = 0; extAttr.stFrameRate.s32SrcFrameRate = 15; extAttr.stFrameRate.s32DstFrameRate = frmRate; ret = HI_MPI_VPSS_SetExtChnAttr(vpssGrp, vpssChn, &extAttr); if (HI_SUCCESS != ret) { ERROR_LOG("HI_MPI_VPSS_SetExtChnAttr(%d, %d) fail: %#x!\n", vpssGrp, vpssChn, ret); return HLE_RET_ERROR; } ret = HI_MPI_VPSS_EnableChn(vpssGrp, vpssChn); if (HI_SUCCESS != ret) { ERROR_LOG("HI_MPI_VPSS_EnableChn(%d, %d) fail: %#x!\n", vpssGrp, vpssChn, ret); return HLE_RET_ERROR; } return HLE_RET_OK; } ``` ![图片说明](https://img-ask.csdn.net/upload/201909/29/1569723865_767347.jpg) 实现代码如上所述，VPSS 物理通道号是0，已经创建并使能， 扩展通道5绑定到物理通道0，总是报参数设置无效，怎么回事？？？
python 正则表达式的问题
import re text='Hi,I am Shirley Hilton.I am his wife.' m=re.findall('\bhi',text) print(m) 为什么这样匹配不到？ 按理说应该匹配到‘his'里面的’hi'吧
Avoiding a disaster 的算法
Man Down 的代码写
Problem Description The Game “Man Down 100 floors” is an famous and interesting game.You can enjoy the game from http://hi.baidu.com/abcdxyzk/blog/item/16398781b4f2a5d1bd3e1eed.html We take a simplified version of this game. We have only two kinds of planks. One kind of the planks contains food and the other one contains nails. And if the man falls on the plank which contains food his energy will increase but if he falls on the plank which contains nails his energy will decrease. The man can only fall down vertically .We assume that the energy he can increase is unlimited and no borders exist on the left and the right. First the man has total energy 100 and stands on the topmost plank of all. Then he can choose to go left or right to fall down. If he falls down from the position (Xi,Yi),he will fall onto the nearest plank which satisfies (xl <= xi <= xr)(xl is the leftmost position of the plank and xr is the rightmost).If no planks satisfies that, the man will fall onto the floor and he finishes his mission. But if the man’s energy is below or equal to 0 , he will die and the game is Over. Now give you the height and position of all planks. And ask you whether the man can falls onto the floor successfully. If he can, try to calculate the maximum energy he can own when he is on the floor.(Assuming that the floor is infinite and its height is 0,and all the planks are located at different height). Input There are multiple test cases. For each test case, The first line contains one integer N (2 <= N <= 100,000) representing the number of planks. Then following N lines representing N planks, each line contain 4 integers (h,xl,xr,value)(h > 0, 0 < xl < xr < 100,000, -1000 <= value <= 1000), h represents the plank’s height, xl is the leftmost position of the plank and xr is the rightmost position. Value represents the energy the man will increase by( if value > 0) or decrease by( if value < 0) when he falls onto this plank. Output If the man can falls onto the floor successfully just output the maximum energy he can own when he is on the floor. But if the man can not fall down onto the floor anyway ,just output “-1”(not including the quote) Sample Input 4 10 5 10 10 5 3 6 -100 4 7 11 20 2 2 1000 10 Sample Output 140

Java学习的正确打开方式

linux系列之常用运维命令整理笔录

Python十大装B语法
Python 是一种代表简单思想的语言，其语法相对简单，很容易上手。不过，如果就此小视 Python 语法的精妙和深邃，那就大错特错了。本文精心筛选了最能展现 Python 语法之精妙的十个知识点，并附上详细的实例代码。如能在实战中融会贯通、灵活使用，必将使代码更为精炼、高效，同时也会极大提升代码B格，使之看上去更老练，读起来更优雅。 1. for - else 什么？不是 if 和 else 才

2019年11月中国大陆编程语言排行榜
2019年11月2日，我统计了某招聘网站，获得有效程序员招聘数据9万条。针对招聘信息，提取编程语言关键字，并统计如下： 编程语言比例 rank pl_ percentage 1 java 33.62% 2 c/c++ 16.42% 3 c_sharp 12.82% 4 javascript 12.31% 5 python 7.93% 6 go 7.25% 7

SQL-小白最佳入门sql查询一

【图解经典算法题】如何用一行代码解决约瑟夫环问题

“狗屁不通文章生成器”登顶GitHub热榜，分分钟写出万字形式主义大作

IT界知名的程序员曾说：对于那些月薪三万以下，自称IT工程师的码农们，其实我们从来没有把他们归为我们IT工程师的队伍。他们虽然总是以IT工程师自居，但只是他们一厢情愿罢了。 此话一出，不知激起了多少(码农)程序员的愤怒，却又无可奈何，于是码农问程序员。 码农：你知道get和post请求到底有什么区别？ 程序员：你看这篇就知道了。 码农：你月薪三万了？ 程序员：嗯。 码农：你是怎么做到的? 程序员：
《程序人生》系列-这个程序员只用了20行代码就拿了冠军

11月8日，由中国信息通信研究院、中国通信标准化协会、中国互联网协会、可信区块链推进计划联合主办，科技行者协办的2019可信区块链峰会将在北京悠唐皇冠假日酒店开幕。 　　区块链技术被认为是继蒸汽机、电力、互联网之后，下一代颠覆性的核心技术。如果说蒸汽机释放了人类的生产力，电力解决了人类基本的生活需求，互联网彻底改变了信息传递的方式，区块链作为构造信任的技术有重要的价值。 　　1

【技巧总结】位运算装逼指南

8年经验面试官详解 Java 面试秘诀
作者 | 胡书敏 责编 | 刘静 出品 | CSDN（ID：CSDNnews） 本人目前在一家知名外企担任架构师，而且最近八年来，在多家外企和互联网公司担任Java技术面试官，前后累计面试了有两三百位候选人。在本文里，就将结合本人的面试经验，针对Java初学者、Java初级开发和Java开发，给出若干准备简历和准备面试的建议。   Java程序员准备和投递简历的实

1.两种思维方式在求职面试中，经常会考察这种问题：北京有多少量特斯拉汽车？ 某胡同口的煎饼摊一年能卖出多少个煎饼？ 深圳有多少个产品经理？ 一辆公交车里能装下多少个乒乓球？ 一