
算法
雨巷迷途
2021级毕业生,前端技术不太会了的java中级开发。
展开
-
c++自定义快速排序
快速排序是什么就不介绍了,一般可以使用STL里的sort函数,以下给出两种自定义快速排序方法。 1、快速排序(需要临时空间) #include<cstdio> void QuickSort(int *a,int n) { if(n<=1) return; int *left=new int[n]; int *right=new int[n]; int nl=0,......原创 2018-08-20 10:38:54 · 711 阅读 · 1 评论 -
AtCoder Beginner Contest 105 C - Base -2 Number
Time Limit: 2 sec / Memory Limit: 1024 MB Score :300300points Problem Statement Given an integerNN, find the base−2−2representation ofNN. Here,SSis the base−2−2representation ofNNwhen ...原创 2018-08-14 14:03:13 · 394 阅读 · 1 评论 -
c++广搜练习--营救
题目描述 铁塔尼号遇险了!他发出了求救信号。距离最近的哥伦比亚号收到了讯息,时间就是生命,必须尽快赶到那里。 通过侦测,哥伦比亚号获取了一张海洋图。这张图将海洋部分分化成n*n个比较小的单位,其中用1标明的是陆地,用0标明是海洋。船只能从一个格子,移到相邻的四个格子。 为了尽快赶到出事地点,哥伦比亚号最少需要走多远的距离。 输入 第一行为n,......原创 2018-08-05 10:14:46 · 4488 阅读 · 1 评论 -
AtCoder 2373 Cookie Exchanges
Problem Statement Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: Each person simultaneously d...原创 2018-07-29 22:14:29 · 418 阅读 · 0 评论 -
Digit Counting UVA - 1225
Trung is bored with his mathematics homeworks. He takes a piece of chalk and starts writing a sequence of consecutive integers starting with 1 to N (1 < N < 10000). After that, he counts the num...原创 2018-07-23 11:36:38 · 328 阅读 · 1 评论