自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Y_CanFly的小小博客

北理工计科Phd在读 / 拿着相机写代码

  • 博客(78)
  • 收藏
  • 关注

原创 【UE4】跨模块调用 / 加载模块记录

众所周知,UE4是模块化的架构,因此在使用插件或者自己定义的其他模块时,往往会涉及到跨模块引用函数或者类的情况,在这里进行一些使用记录。下文的项目示例中,UnrealTestCore为主模块,Second为第二个模块。1. 在Build.cs文件中加入引用PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "Second" });PrivateDependencyModuleNa

2022-04-25 15:53:36 2600

原创 【UE4】使用UE_LOG输出

记录自定义Log名称类型的UE_LOG输出方式,免得老忘记在头文件中声明自定义Log名称DECLARE_LOG_CATEGORY_EXTERN(LogYCF, Log, All);在cpp文件中定义Log名称DEFINE_LOG_CATEGORY(LogYCF);Log输出方式UE_LOG(LogYCF, Warning, TEXT("Time:%f, Value:%f"), key.Time, key.Value);学习不息,继续加油...

2021-09-10 15:12:31 1758

原创 【BIT乐学】Gone fishing【贪心+枚举】

DescriptionJohn is going on a fishing trip. He has h hours available (1 <= h <= 16), and there are n lakes in the area (2 <= n <= 25) all reachable along a single, one-way road. John starts at lake 1, but he can finish at any lake he wants. H

2021-03-06 14:35:48 568

原创 【BIT乐学】活动调度

题目输入要求:第一行为活动的个数 N(1<=N<=1 000 000) 。接下来 N 行为 Si 和 Fi(0<=Si<Fi<=2 000 000 000) ,分别代表第 i 个活动的开始时间和结束时间。活动 i 的区间段为 [Si,Fi)输出要求:输出有一行 M ,为所需教室的最小数量。测试用例输入111 43 50 65 73 85 96 108 118 122 1312 14输出5个人思路输入的同时

2021-03-05 11:27:49 538

原创 【UE4】UE4.25+OpenCV环境配置

UE4.25+OpenCV环境配置一、前言最近实验室项目需要将外置摄像头接入UE4,因此需要将OpenCV第三方库配置到UE4内,在此做个记录,经验证在4.25和4.26上均可配置成功。二、下载OpenCVUE4中的OpenCV插件已经在Github上了,因此只需将其下载解压即可。Github:https://github.com/Brandon-Wilson/OpenCV-Plugin下载后解压目录:三、将OpenCV库复制进项目将解压后的Binaries、Plugin

2020-12-23 14:17:47 3951 12

原创 【PAT甲级】1029 Median

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 12, and the median of S2 = { 9, 10, 15, 16, 17 } is...

2019-09-29 11:08:49 143

原创 【记录】2019年北京理工大学计算机学院推免复试机试上机题

推免到今天也终于告一段落啦,答应达仔写了复试机试的题目,其实都是很简单的题,测试用例也是老师手动输入的,没有极端样例,一共两题,一题10分。第一题在一行内输入数个字符串,每个字符串用空格隔开,求输出所有字符串的最大前缀子串(区分大小写),如果前缀子串不存在,则输出None。Example1输入:Word World WorlExample1输出:WorExam...

2019-09-28 11:26:53 1816 2

原创 【环境配置】Win10系统下jdk-11.0.2配置过程

Java装了好几次,每次都要重新找环境变量的设置,在此记录一下。1. 下载JDK可以在Java下载最新版的JavaSE安装包https://www.oracle.com/technetwork/java/javase/downloads/index.html截止到目前,最新版已经更新到JDK12可以选择直接下载JDK或者exe安装安装后可以找到JDK文件目录2....

2019-03-27 23:01:14 594

原创 【算法笔记】快速幂的两种写法(递归法+迭代法)

快速幂的递归法// 求a^b%m ll binaryPow(ll a, ll b, ll m) { if (b == 0) return 1; if (b %2 == 1) { return a * binaryPow(a, b-1, m) % m; } else { ll tmp = binaryPow(a, b/2, m); return tmp * tmp % m...

2019-02-18 09:45:58 1138 1

原创 【经典问题】N皇后(回溯法)

假期稍微回顾一下一些经典问题的写法说明:N皇后问题遍历的话太耗时间,因此使用回溯法解决代码#include &lt;cstdio&gt;#include &lt;cmath&gt;#include &lt;iostream&gt;#define ll long longusing namespace std;const int maxn = 16;bool hash...

2019-02-18 09:21:52 355

原创 【数字图像处理】MATLAB实现图像旋转

前言上节课学习了实现图像旋转的原理,下课后用matlab实现了一下图像旋转的功能,这里做个记录。图像旋转原理图像旋转的本质利用的是向量的旋转。矩阵乘法的实质是进行线性变换,因此对一个向量进行旋转操作也可以通过矩阵和向量相乘的方式进行。【ps:线性代数的本质这个视频很直观地解释了各种线性代数运算的实质,链接:https://www.bilibili.com/video/av673...

2018-11-17 22:33:28 50751 35

原创 【数字图像处理】二维(2D)线性插值的应用

应用情况在使用matlab对图像进行各种操作的时候经常要使用插值进行计算。例如:图像缩放、图像旋转、仿射变换等等。线性插值先介绍线性插值的概念。已知两个点(x1, y1)、(x2, y2),求它们中间横坐标为x的点的y值。则可以利用如下公式进行插值计算。其中a和(1-a)为x距离x1和x2的距离占(x2-x1)的比例。y = a*y1 + (1-a)*y2线...

2018-11-17 21:33:38 8082 4

原创 【PAT甲级】1085 Perfect Sequence(二分法)

Given a sequence of positive integers and another positive integer p. The sequence is said to be a perfect sequence if M≤m×p where Mand m are the maximum and minimum numbers in the sequence, respectiv...

2018-11-13 20:01:12 197

原创 【PAT甲级】1044 Shopping in Mars(二分法)

Shopping in Mars is quite a different experience. The Mars people pay by chained diamonds. Each diamond has a value (in Mars dollars M$). When making the payment, the chain can be cut at any position ...

2018-11-13 19:45:15 269

原创 【PAT甲级】1010 Radix(二分法)

Given a pair of positive integers, for example, 6 and 110, can this equation 6 = 110 be true? The answer is yes, if 6 is a decimal number and 110 is a binary number.Now for any pair of positive inte...

2018-11-13 19:27:35 168

原创 【算法笔记】二分法的使用(使用目的+模板)

今天看完《算法笔记》里二分法这个章节,稍微总结一下。二分法的思想主要就是折半查找,达到O(logn)的查找速度。使用目的或者说使用情景主要有如下三个,下面将依次介绍。查找有序序列中是否存在满足条件的元素 查找有序序列中满足条件的第一个元素 对一些函数进行求根(近似)计算1. 查找有序序列中是否存在满足条件的元素下面的函数是找到a[]数组中是否有等于x的元素,如果有返回索引下标...

2018-11-12 21:56:31 613

原创 【PAT甲级】1070 Mooncake(贪心)

Mooncake is a Chinese bakery product traditionally eaten during the Mid-Autumn Festival. Many types of fillings and crusts can be found in traditional mooncakes according to the region's culture. Now ...

2018-11-07 15:07:18 206

原创 【PAT甲级】1067 Sort with Swap(0, i)(贪心)

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 is allowed to use? For example, to sort {4, 0, 2...

2018-11-07 14:57:57 534 1

原创 【PAT甲级】1038 Recover the Smallest Number(贪心+排序)

Given a collection of number segments, you are supposed to recover the smallest number from them. For example, given { 32, 321, 3214, 0229, 87 }, we can recover many numbers such like 32-321-3214-0229...

2018-11-07 12:37:00 307 1

原创 【PAT甲级】1037 Magic Coupon(贪心)

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 product, you may get N times the value of that product b...

2018-11-06 21:33:31 270

原创 【PAT甲级】1033 To Fill or Not to Fill(贪心)

With highways available, driving a car from Hangzhou to any other city is easy. But since the tank capacity of a car is limited, we have to find gas stations on the way from time to time. Different ga...

2018-11-06 21:01:09 317

原创 【算法笔记】散列(hash)总结

有两天没写博客了,前两天刷完了PAT甲级中的散列的题目,做一个小小的总结。散列的定义:将元素通过一个函数转化成一个整数,使得该整数能够尽量唯一地代表这个元素。最常用的散列:对于数字而言,H(key) = key,最常见的用法是某个数字直接作为对于数组的下标。比如标记某个数字num(0 &lt;= num &lt;= 10000)是否出现过,可以直接映射到bool数组vis[10...

2018-11-05 15:39:53 235

原创 【PAT甲级】1092 To Buy or Not to Buy(散列)

Eva would like to make a string of beads with her favorite colors so she went to a small shop to buy some beads. There were many colorful strings of beads. However the owner of the shop would only sel...

2018-11-02 13:39:13 169

原创 【PAT甲级】1084 Broken Keyboard(散列)

On a broken keyboard, some of the keys are worn out. So when you type some sentences, the characters corresponding to those keys will not appear on screen.Now given a string that you are supposed to...

2018-11-02 13:31:27 246 1

原创 【PAT甲级】1050 String Subtraction(散列)

Given two strings S​1​​ and S​2​​, S=S​1​​−S​2​​ is defined to be the remaining string after taking all the characters in S​2​​ from S​1​​. Your task is simply to calculate S​1​​−S​2​​ for any given s...

2018-11-02 13:21:06 177

原创 【PAT甲级】1048 Find Coins(散列/二分)

Eva loves to collect coins from all over the universe, including some other planets like Mars. One day she visited a universal shopping mall which could accept all kinds of coins as payments. However,...

2018-11-02 13:15:04 242

原创 【PAT甲级】1041 Be Unique(散列)

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 number chosen from [1,10​4​​]. The first one who bets o...

2018-11-02 13:07:49 218

原创 【算法笔记】排序算法的应用:sort函数的应用以及比较函数的写法

刷完了PAT甲级的排序算法专块,写一个小总结吧。其实PAT的排序算法题思路都不难,难就难在细节的把握还有一些边缘条件的判断。sort函数在C++的algorithm库中,使用时需要#include &lt;algorithm&gt;sort函数的前两个参数其实就是要排序序列的首尾地址,可以根据这个对某个数组的子序列进行排序,另外快排的时间复杂度为O(nlogn)sort(a...

2018-11-01 20:25:43 318

原创 【PAT甲级】1095 Cars on Campus

Zhejiang University has 8 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 gate. Now with all the information available, you a...

2018-11-01 20:05:39 689

原创 【PAT甲级】1080 Graduate Admission

It is said that in 2011, there are about 100 graduate schools ready to proceed over 40,000 applications in Zhejiang Province. It would help a lot if you could write a program to automate the admission...

2018-11-01 13:01:01 147

原创 【PAT甲级】1083 List Grades

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, and output those student records of which the grades ...

2018-11-01 11:51:02 101

原创 【PAT甲级】1075 PAT Judge

The ranklist of PAT is generated from the status list, which shows the scores of the submissions. This time you are supposed to generate the ranklist for PAT.Input Specification:Each input file co...

2018-11-01 11:22:54 304

原创 【PAT甲级】1062 Talent and Virtue

About 900 years ago, a Chinese philosopher Sima Guang wrote a history book in which he talked about people's talent and virtue. According to his theory, a man being outstanding in both talent and virt...

2018-10-31 19:19:34 161

原创 【PAT甲级】1055 The World's Richest

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 simulate this job, but concentrate only on the peopl...

2018-10-31 18:45:38 241

原创 【PAT甲级】1028 List Sorting

Excel can sort records according to any column. Now you are supposed to imitate this function.Input Specification:Each input file contains one test case. For each case, the first line contains two...

2018-10-31 15:15:49 118

原创 【PAT甲级】1025 PAT Ranking

Programming Ability Test (PAT) is organized by the College of Computer Science and Technology of Zhejiang University. Each test is supposed to run simultaneously in several places, and the ranklists w...

2018-10-31 12:53:50 142

原创 【PAT甲级】1016 Phone Bills

A long-distance telephone company charges its customers by the following rules:Making a long-distance call costs a certain amount per minute, depending on the time of day when the call is made. When...

2018-10-31 12:13:19 1659 2

原创 【PAT甲级】1012 The Best Rank

To evaluate the performance of our first year CS majored students, we consider their grades of three courses only: C - C Programming Language, M - Mathematics (Calculus or Linear Algrbra), and E - Eng...

2018-10-30 21:10:05 113

原创 【PAT甲级】1002 A+B for Polynomials

This time, you are supposed to find A+B where A and B are two polynomials.Input Specification:Each input file contains one test case. Each case occupies 2 lines, and each line contains the informa...

2018-10-29 20:13:55 109

原创 【PAT甲级】1001 A+B Format

Calculate a+b and output the sum in standard format -- that is, the digits must be separated into groups of three by commas (unless there are less than four digits).Input Specification:Each input ...

2018-10-29 20:06:45 85

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

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