自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(13)
  • 收藏
  • 关注

原创 Primitive root + FFT + String Match

#include <stdio.h> #include <math.h> int root[100002]={...<Calculate 1e6 primitive root and put them here to get the root in O(1) ops>...}; long long A; long long N,m,num[10...

2019-05-16 10:17:17 137

原创 String Match

#include <stdio.h> #include <math.h> #define pln printf("\n"); #define p(a) printf("%f ", a); int N, M, K; int t; int n; char S[1000000]; char tT[1000000]; char T[1000000...

2019-05-16 10:13:47 179

原创 UVA1616 with inclusion interval

Description LanranhasNfriends. Every Sunday, Lanran has to play with his friends. The i-th friend can play with Lanran from timea_iai​to timeb_ibi​. However, Lanran has to play with each of his ...

2019-04-05 09:13:08 237

原创 Maze Problem with weight 1 and 2

Description Hongwaskidnappedbyabadwoman.Shewasputinaprison.ShetransmitteddistresssignalstoSstudentstosaveherassoonaspossible. TheprisoncanbeconsideredasaN\times MN×M...

2019-04-05 09:09:14 147

原创 Stable Matching

Description There areNSAs andNstudents. Each SA has to help a student one-to-one. However, each SA has a rank of preference for different students, and each student has a rank of preference for d...

2019-04-05 09:07:22 263

原创 A+B

import java.io.*; import java.util.*; public class Main { public static void main(String[] args) throws IOException { Scanner scan = new Scanner(System.in); int a = scan.nextInt...

2019-04-05 09:05:43 149

原创 A*算法javafx可视化-以曼哈顿算法为F的自动寻路算法Astar的可视化实现

最近在用javafx尝试做一款简单的2D游戏,涉及到自动寻路问题,经过搜索后发现A*算法可用性高。因为没有扎实的算法基础,就用了简单的曼哈顿函数做为F来实现A*算法。实现了通过修改代码来设置障碍。基本步骤按照百度百科中的伪代码来实现:原文地址:https://baike.baidu.com/item/A%2A%E7%AE%97%E6%B3%95/215793?fr=aladdinwhile(OPE...

2018-07-09 10:18:01 721 1

原创 Thread.748的javaFX多线程并发问题

最近在尝试用javafx写一个简单的2D游戏,没有仔细学过FX和多线程,就闭门造车一次。在制作过程中,发现当移动射击等操作越来越多、主页面图形变化逐渐丰富的时候,开始出现卡顿,最后有概率地出现Not on java FX Application问题,接着出现NullPointerException导致程序崩溃。逐步排查后发现可能是并发问题,之前一直没有考虑到并发,而是简单地使用Platform.r...

2018-06-26 16:06:04 2586

原创 存在交换半径的排列问题

有甲、乙、丙、丁、戊、己、庚、辛...等 n 个人按顺序坐在一列椅子上,现在每个人都可以交换位置(不一定要交换),但交换半径只能为m。问一共有几种交换方法?(m &lt;&lt; n)说明:如果m为2,则丙只能坐到甲乙丁戊的位置,而丁只能坐到乙丙戊己的位置。背景:这几个礼拜的Java每周作业都是破解字符替换式密码,如破解:53$$+305))6*;4826)4$.)4$);806*;48+8%60...

2018-04-25 20:58:35 177

翻译 Stéphane's Java course : Lecture 5

class OuterClass{    . . .   class NestedClass{       . . .   }}class OuterClass{    . . .    public void doSomething(){        class LocalClass{            . . .      }    }}Lambda表达式可以有一个嵌套类和方法内部类这样...

2018-04-22 11:54:39 164

翻译 Stéphane's Java course : Lecture 4

Lecture 3 提到了可变的数组(Resizable Array),LinkedList类。这节课详细讲哈希表(Hash Table)接口。 .hashCode()方法返回一串字符如:"hash = 1550089733" 可以用一个模组,将对象存储在特定的位置。但是不同的元素(items)可以有同样的hashCode,这意味着它们被放在了同一个地方。这个问题叫作冲突(conflict)。自动...

2018-04-21 20:20:51 167

翻译 Stéphane's Java course : Lecture3

在提到容器(Collection)之前,应该要先了解泛型(Generics)。泛型对代码的复用性(Reusing code)非常重要。你一定在使用ArrayList的时候,了解了一下泛型。强类型语言(Strong typing):编译器不会让你随意混淆数据类型,除非它们本身可以兼容(Compatible),例如:int 和 float(个人理解应该是在做基本算术运算的时候的自动转换吧)。 如果想将...

2018-04-21 20:20:03 116

翻译 Stéphane's Database course : Lecture 05

Lecture 04 部分内容自定义字符串排序规则 :示例代码 :order by    case credited_as        when 'D' then 1        when 'P' then 2        when 'A' then 3    end获取前10行 :示例代码 :-- select top 10 (SQLServer)select title, country...

2018-04-21 20:04:13 176

空空如也

空空如也

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

TA关注的人

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