![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
-------------基础算法-------------
不想悲伤到天明
这个作者很懒,什么都没留下…
展开
-
二分查找水题--疯牛(POJ 2456)
DescriptionFarmer John has built a new long barn, with N (2 <= N <= 100,000) stalls. The stalls are located along a straight line at positions x1,...,xN (0 <= xi <= 1,000,000,000).His C...原创 2018-07-18 22:02:40 · 2584 阅读 · 0 评论 -
Best Cow Fences POJ - 2018 (二分答案)
Best Cow Fences Farmer John's farm consists of a long row of N (1 <= N <= 100,000)fields. Each field contains a certain number of cows, 1 &l...原创 2019-02-11 20:59:39 · 2002 阅读 · 0 评论 -
高精度加减乘模板
高精度加法 :#include <iostream>#include <cstdio>#include <cstring>// 高精度入门const int MAX = 100005 ;using namespace std ;char s[MAX] ;char s1[MAX] ;int a[MAX] ,b[MAX] ,c[MAX] ;...原创 2019-03-03 12:54:24 · 320 阅读 · 0 评论 -
Creative Snap(分治)
C. Creative SnapThanos wants to destroy the avengers base, but he needs to destroy the avengers along with their base.Let we ...原创 2019-03-07 20:25:32 · 473 阅读 · 0 评论 -
Krypton Factor UVA - 129
题目链接 :https://cn.vjudge.net/problem/UVA-129题意 : 如果一个字符串包含两个相邻的重复子串,则称它为“容易的串”,否则称为“困难的串”,例如,BB,ABCDABCD,ABCDACABCAB,都是容易的串,而D,ABAC,都是困难的串。输入正整数n,L,让你找出由字母表前L个大写字母组成的字典序第n小的困难的串,并且输出这个串的长度。输出格式请点击上...原创 2019-05-13 19:31:41 · 181 阅读 · 0 评论 -
Prime Ring Problem UVA - 524
题目连接 :https://vj.ti12z.cn/fd5e336dbfda2775780486ea45633879?v=1557301401#include<iostream>#include<cstring>#include<cmath>using namespace std;const int MAX = 1005 ;bool isp...原创 2019-05-13 12:59:09 · 185 阅读 · 0 评论 -
Subsequence POJ - 3061 (尺取法)
A sequence of N positive integers (10 < N < 100 000), each of them less than or equal 10000, and a positive integer S (S < 100 000 000) are given. Write a program to find the minimal length ...原创 2019-08-21 14:37:26 · 238 阅读 · 0 评论