easyarm287_51CTO博客
时间:2019年1月22日单位需要在EasyARM-i.MX287A开发板上做嵌入式开发,这块板子现在已经极其廉价,而且参考资料多又全,是入门不错的选择。之前没有接触过硬件编程相关的技术,参考了很多前辈的经验,实现了Arm开发板上运行Hello World,此文记录主要的实现过程。Arm开发现有WinCE和Linux两个平台,WinCE符合大多数用户使用Windows系统的习惯,Linux系统开发
0 前言 本文使用freemodbus协议栈,在EasyARM i.mx287上实现了modbus tcp从机。在该从机中定义了线圈寄存器。当中线圈寄存器地址较低的4位和EasyARM的P2.4至P2.5关联,通过modbus指令可控制GPIO的输出。本文改动自freemodbus 演示样例LINU
转载 2017-05-01 08:53:00
243阅读
2评论
给定两个整数,分别表示分数的分子 numerator 和分母 denominator,以字符串形式返回小数。
原创 2021-06-14 22:47:29
240阅读
了每个点的覆盖区域,那么问题就转化为区间的覆盖问题了。。。在算重叠的部分花了好长的时间而且还没有写好,还是没有把出现的情况讨论清楚。。。 AC: #include #include #inclu
原创 2023-05-30 05:06:00
63阅读
Given an array nums containing n + 1 integers where each integer is between 1 and n (inclusive), prove that at least one duplicate number must exist.
转载 2019-10-30 10:36:00
63阅读
2评论
John Doe has found the beautiful permutation formula. Let's take permutation p = p1, p2, ..., pn. Let's define transformation f of this permutation: where k (k > 1) is an integer, the transforma
转载 2017-08-04 09:43:00
34阅读
2评论
Given an array nums containing n + 1 integers where each integer is between 1 and n (inclusive), prove that at least one duplicate number must exist.
转载 2018-11-03 22:21:00
32阅读
2评论
题目 Given an array nums containing n + 1 integers where each integer is between 1 and n (inclusive), prove that at least one duplicate number must exist. Assume that there is only one duplicate number,
原创 1月前
70阅读
Android Weekly Issue #287圣诞节快要来了,小编也偷懒了,本期内容包括如何通过AS添加网络字体库,以及如何使用Dagger.Android等实现Clean Architecture,还包含一篇Android安全系列的文章,介绍如何实现长数据的加密.关于Kotlin的技巧以及系统数据库的替代品,也有各有两篇系列文章,值得一看.ARTICLES & TUTORIALSTh
转载 2021-06-02 16:02:05
113阅读
Given an array nums containing n + 1 integers where each integer is between 1 and n (inclusive), prove thater, fin
原创 2022-08-03 17:08:28
26阅读
287. **Find the Duplicate Numberhttps://leetcode.com/problems/find-the-duplicate-number/description/题目描述Given an array nums containing n + 1 integers where each integer is between 1 and n (inclusiv...
题目Given an array nums containing n + 1 integers where each integer is between 1 and n (inclusive), prove that at least one duplicate number must exist. Assume that there is only one duplicate number, f
原创 2023-03-07 12:53:48
102阅读
源程序: //程序7-8 #include <iostream> #include <iomanip> using namespace std; int main() { double x = 12.34; cout << "1)" << setiosflags(ios::scientific |
原创 2022-06-08 12:25:33
72阅读
class Solution {public: int
原创 2022-08-11 10:24:18
57阅读
we have an array with length of n+1, and it contains from 1 to n. ...
转载 2020-11-10 10:11:00
96阅读
2评论
SPOJ_287     YY了一下颜色的数量取决于网络流中各条边中最大的流量,于是二分边的容量并做网络流就可以了。     但至于为什么颜色的数量取决于网络流中各条边中最大的流量,暂时没有细加证明…… #include<stdio.h> #include<string.h> #include<algorithm> #define MAXD 510 #defi
转载 2012-08-08 10:51:00
63阅读
2评论
给定一个包含 n + 1 个整数的数组 nums,其数字都在 1 到 n 之间(包括 1 和 n),可知至少存在一个重复的整数。假设只有一个重复的整数,找出这个重复的数。 示例 1: 输入: [1,3,4,2,2]输出: 2示例 2: 输入: [3,1,3,4,2]输出: 3说明: 不能更改原数组(
转载 2020-10-04 13:14:00
52阅读
2评论
1. 不修改原数组,使用额外的空间class Solution { public: int findDuplicate(vector<int>& nums) { int n = nums.size(); vector<int> hash(n, -1); for(int i = 0; i < n; i++)
原创 2023-05-06 00:57:13
83阅读
Title给定一个包含 n + 1 个整数的数组 nums,其数字都在 1 到 n 之间(包括 1 和 n),可知至少存在一个重复的整数。假设只有一个重复的整数,找出这个重复的数。示例 1:输入: [1,3,4,2,2]输出: 2示例 2:输入: [3,1,3,4,2]输出: 3说明:不能更改原数组(假设数组是只读的)。只能使用额外的 O(1) 的空间。时间复杂度小于 O(n2) 。数组中只有一个重复的数字,但它可能不止重复出现一次。Solve这道题就比较简单了,我的第一个思路就
原创 2021-08-10 10:06:30
116阅读
Title给定一个包含 n + 1 个整数的数组 nums,其数字都在 1 到 n 之间(包括 1 和 n),可知至少存在一个重复的整数。假设只有一个重复的整数,找出这个重复的数。示例 1:输入: [1,3,4,2,2]输出: 2示例 2:输入: [3,1,3,4,2]输出: 3说明:不能更改原数组(假设数组是只读的)。只能使用额外的 O(1) 的空间。时间复杂度小于 O(n2) 。数组中只有一个重复的数字,但它可能不止重复出现一次。Solve这道题就比较简单了,我的第一个思路就
原创 2022-03-09 17:26:04
79阅读
  • 1
  • 2
  • 3
  • 4
  • 5