自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(46)
  • 资源 (1)
  • 收藏
  • 关注

原创 计算几何模板

计算几何 模板

2016-07-22 10:21:37 1696 1

原创 hdu 3519 Lucky Coins Sequence 矩阵快速幂

Lucky Coins SequenceTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 921    Accepted Submission(s): 488Problem DescriptionAs we all know,every co...

2016-07-19 09:56:46 663

原创 [Unity] 俯视视角游戏高效检测视野边缘的方法

通过在初始时遍历屏幕左下、左上、右上、右下四个点,分别从屏幕发出一条射线,即可获得与地面平面碰撞的四个交点,这四个点构成的平面就是视野范围。如果地面是近似无限的平面,那么把从摄像机初始到当前的位置向量,分别加上与这四个点的偏移,就可以得到当前的摄像机视野范围。假设这四个点围成的线段长度为l1,l2,l3,l4,总长度为L,那么可以求得落在视野边缘的随机一点。游戏中很多功能需要获取视野边缘的坐标,或者判断给定点是否在视野内,比如很多俯视视角Rogue游戏通过检测视野边缘来自动生成敌人。

2023-04-20 22:24:43 367

原创 [Unity3D] 任意图片转成Skybox能用的材质

1.修改原图属性, 只需要将原图Texture Type改为Default, Texture Shape改为Cube后Apply即可。2.创建一个材质,Shader选择Skybox/Cubemap, 将Cubemap设置为转换后的原图即可实现自定义的天空盒。

2023-04-20 20:27:33 724

原创 Unity3D DoTween 个人使用总结\

dotween曲线针对不同的组件,提供了不同的函数,要使用想要的dotween函数,需要先知道哪些组件有这个函数在transform下有 抖动DOShakePosition 函数, public static Tweener DOShakePosition(this Transform target, float duration, float strength = 1, i...

2019-05-11 13:48:05 1046 1

原创 unity3d BUG总结

1.错误提示"Serializedobject target has been destroyed. UnityEngine.GUIUtility:ProcessEvent(Int32,IntPtr)",在LoadScene的时候会出这个错误,找了半天BUG,各种原因都找过,就是找不出来哪出了问题,最后发现是锁上了Inspector,这个时候切换场景就会报错解锁之后再切换场景就没问题了2....

2019-05-08 21:00:11 7107 4

原创 Unity3D 下载导入DoTween插件

DoTween可以很简单实现动画效果,http://dotween.demigiant.com/download.php下载下载之后你会发现给你的是一些文件而不是unity的package,所以要添加new asset但是不能把这个全选后导入,否则子文件夹的不会给你导入后来我发现一个方法:在电脑的unity对应项目文件夹里,直接复制过去就行了,复制完了再打开unit...

2019-04-14 22:15:52 2737

原创 LeetCode 289. 生命游戏

根据百度百科,生命游戏,简称为生命,是英国数学家约翰·何顿·康威在1970年发明的细胞自动机。给定一个包含 m × n 个格子的面板,每一个格子都可以看成是一个细胞。每个细胞具有一个初始状态 live(1)即为活细胞, 或 dead(0)即为死细胞。每个细胞与其八个相邻位置(水平,垂直,对角线)的细胞都遵循以下四条生存定律:1. 如果活细胞周围八个位置的活细胞数少于两个,则该位置活细胞死亡;2. ...

2018-05-25 20:20:44 1058

原创 LeetCode 54.螺旋矩阵(回型矩阵)(蛇形矩阵)

给定一个包含 m x n 个元素的矩阵(m 行, n 列),请按照顺时针螺旋顺序,返回矩阵中的所有元素。示例 1:输入:[ [ 1, 2, 3 ], [ 4, 5, 6 ], [ 7, 8, 9 ]]输出: [1,2,3,6,9,8,7,4,5]示例 2:输入:[ [1, 2, 3, 4], [5, 6, 7, 8], [9,10,11,12]]输出: [1,2,3...

2018-05-05 19:23:14 1651

原创 日常-按键精灵写的领取游戏兑换码的脚本

最近在taptap上看到一个游戏,roguelike类型的手游,叫不思议迷宫,有点像魔塔,不过装备种类丰富,英雄种类繁多,可玩性感觉挺高的。然后又发现里面有个密令,也就是兑换码,然后这个兑换码永久的有很多很多,大概有400+?手动输输到猴年马月。。而且你不知道你输入的重复过没有。所以我就想做个简单的脚本实现繁琐的兑换。最近刚好接触到了按键精灵,感觉入门挺快,效率也很高。有了实现的工具,剩下的就是实...

2018-05-03 22:30:47 5165 1

原创 排序算法

常见的排序算法有几种选择排序插入排序冒泡排序快速排序归并排序堆排序

2017-04-17 21:15:14 374

原创 QT下载

QT下载 现在的QT官网很难找到qt的免费版下载地址,找了半天找到了下面这个链接, qt下载链接 点进去后,点qt,然后有很多版本可供下载,我们选择比较新的一个版本 然后选择版本,如果是windows系统,qt可以在vs上运行,选择对应版本号msvc2015或者2013,配置vs还需要下载vs add in.或者在qtcreator上运行,选择mingw. 下载完成后安装,其中有自定

2017-04-17 20:52:20 552

原创 codeblocks 快捷键

ctrl+shift+u 全变大写ctrl+u 全变小写

2017-02-27 10:55:15 397 1

原创 算术基本定理

算术基本定理

2016-09-07 22:55:37 576

原创 蒙特卡洛算法

蒙特卡洛算法

2016-08-24 10:42:46 1922

原创 poj 3842 An Industrial Spy 筛法 全排列

poj 3842 An Industrial Spy 筛法 全排列DescriptionIndustrial spying is very common for modern research labs. I am such an industrial spy - don't tell anybody! My recent job was to steal the latest inventions from a famous math research lab. It was hard to obta

2016-08-12 15:38:59 1009

原创 poj 2992 Divisors 筛法 算术基本定理

poj 2992 Divisors 筛法 算术基本定理Your task in this problem is to determine the number of divisors of Cnk. Just for fun -- or do you need any special reason for such a useful computation?

2016-08-11 11:43:13 432

原创 poj 2262 Goldbach's Conjecture 筛法 哥德巴赫猜想

poj 2262 Goldbach's Conjecture 筛法 哥德巴赫猜想In 1742, Christian Goldbach, a German amateur mathematician, sent a letter to Leonhard Euler in which he made the following conjecture: Every even number greater than 4 can be written as the sum of two odd prime n

2016-08-09 08:57:53 521

原创 poj 2191 Mersenne Composite Numbers 筛法判素数

poj 2191 Mersenne Composite Numbers 筛法判素数One of the world-wide cooperative computing tasks is the "Grand Internet Mersenne Prime Search" -- GIMPS -- striving to find ever-larger prime numbers by examining a particular category of such numbers.

2016-08-08 21:43:42 469

原创 poj 1730 Perfect Pth Powers 筛法

poj 1730 Perfect Pth Powers 筛法We say that x is a perfect square if, for some integer b, x = b2. Similarly, x is a perfect cube if, for some integer b, x = b3. More generally, x is a perfect pth power if, for some integer b, x = bp. Given an integer x you

2016-08-08 21:27:19 439

原创 poj 1142 Smith Numbers 筛法

poj 1142 Smith Numbers 筛法While skimming his phone directory in 1982, Albert Wilansky, a mathematician of Lehigh University,noticed that the telephone number of his brother-in-law H. Smith had the following peculiar property: The sum of the digits of that

2016-08-08 21:11:59 577

原创 hdu 4715 Difference Between Primes 筛法

hdu 4715 Difference Between Primes 筛法All you know Goldbach conjecture.That is to say, Every even integer greater than 2 can be expressed as the sum of two primes. Today, skywind present a new conjecture: every even integer can be expressed as the differen

2016-08-08 20:52:20 549

原创 hdu 2710 Max Factor 筛法

hdu 2710 Max Factor 筛法To improve the organization of his farm, Farmer John labels each of his N (1 <= N <= 5,000) cows with a distinct serial number in the range 1..20,000. Unfortunately, he is unaware that the cows interpret some serial numbers as better

2016-08-08 20:38:39 318

原创 hdu 1286 找新朋友 欧拉函数

hdu 1286 找新朋友 欧拉函数新年快到了,“猪头帮协会”准备搞一个聚会,已经知道现有会员N人,把会员从1到N编号,其中会长的号码是N号,凡是和会长是老朋友的,那么该会员的号码肯定和N有大于1的公约数,否则都是新朋友,现在会长想知道究竟有几个新朋友?请你编程序帮会长计算出来。

2016-08-08 20:32:35 441

原创 hdu 1262 寻找素数对 筛法

哥德巴赫猜想大家都知道一点吧.我们现在不是想证明这个结论,而是想在程序语言内部能够表示的数集中,任意取出一个偶数,来寻找两个素数,使得其和等于该偶数.做好了这件实事,就能说明这个猜想是成立的.由于可以有不同的素数对来表示同一个偶数,所以专门要求所寻找的素数对是两个值最相近的.

2016-08-08 20:19:56 794

原创 poj 2689 Prime Distance 筛法+区间筛素数

The branch of mathematics called number theory is about properties of numbers. One of the areas that has captured the interest of number theoreticians for thousands of years is the question of primality. A prime number is a number that is has no proper fac

2016-08-08 20:07:30 444

原创 poj 1584 A Round Peg in a Ground Hole 计算几何

poj 1584 A Round Peg in a Ground Hole 计算几何The DIY Furniture company specializes in assemble-it-yourself furniture kits. Typically, the pieces of wood are attached to one another using a wooden peg that fits into pre-cut holes in each piece to be attached.

2016-08-03 19:23:54 412

原创 poj 1039 Pipe 计算几何

poj 1039 Pipe 计算几何The GX Light Pipeline Company started to prepare bent pipes for the new transgalactic light pipeline. During the design phase of the new pipe shape the company ran into the problem of determining how far the light can reach inside each c

2016-08-03 09:59:52 331

原创 poj 3449 Geometric Shapes 计算几何

poj 3449 Geometric Shapes 计算几何While creating a customer logo, ACM uses graphical utilities to draw a picture that can later be cut into special fluorescent materials. To ensure proper processing, the shapes in the picture cannot intersect. However, some l

2016-08-02 21:08:51 603

原创 poj 1696 Space Ant 计算几何

poj 1696 Space Ant 计算几何The most exciting space discovery occurred at the end of the 20th century. In 1999, scientists traced down an ant-like creature in the planet Y1999 and called it M11. It has only one eye on the left side of its head and just three f

2016-07-27 19:45:29 404

原创 poj 2653 Pick-up sticks 计算几何

poj 2653 Pick-up sticks 计算几何Stan has n sticks of various length. He throws them one at a time on the floor in a random way. After finishing throwing, Stan tries to find the top sticks, that is these sticks such that there is no stick on top of them. Stan

2016-07-26 09:49:20 304

原创 poj 1269 Intersecting Lines 计算几何

poj 1269 Intersecting Lines 计算几何We all know that a pair of distinct points on a plane defines a line and that a pair of lines on a plane will intersect in one of three ways: 1) no intersection because they are parallel, 2) intersect in a line because they

2016-07-25 21:18:38 399

原创 poj 3304 segments 计算几何

poj 3304 segments 计算几何Given n segments in the two dimensional space, write a program, which determines if there exists a line such that after projecting these segments on it, all projected segments have at least one point in common.

2016-07-25 20:17:31 573

原创 poj 2398 Toy Storage 计算几何+二分

poj 2398 Toy Storage 计算几何+二分 Toy StorageTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 5296 Accepted: 3136DescriptionMom and dad have a problem: their child, Reza, never puts his toys away when he is finished playing with them. They gave R

2016-07-25 17:15:53 253

原创 poj 2318 toys 计算几何+二分

poj 2318 toys 计算几何+二分

2016-07-25 11:08:13 329

原创 codeforces 145E Lucky Queries

codeforces 145E Lucky Queries

2016-07-24 14:28:41 824

原创 codeforces 213B div2 The Fibonacci Segment

The Fibonacci Segment codeforces div2 213B

2016-07-24 14:15:01 425

原创 筛法和欧拉函数

素数

2016-07-24 10:27:56 348

原创 我所听过的 算法||思想||算法名词

算法总结

2016-07-23 19:22:25 580 1

原创 poj 3984 迷宫问题 bfs

poj 3984 迷宫问题 bfs

2016-07-10 20:41:11 609

C++命令行实现的学生社团管理系统

C++命令行实现的学生社团管理系统,实现了学生的增添删除修改,社团的增添删除修改以及学生在社团中的一些操作

2018-04-17

空空如也

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

TA关注的人

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