Problem : Given an integer array with even length, where different numbers in this array represent different kinds of candies. Each number means one c ...
分类:
其他好文 时间:
2020-04-17 00:23:13
阅读次数:
77
Problem: A?+?B is a problem used to test one's basic knowledge for competitive programming. Here is yet another boring variation of it. You have two i ...
分类:
其他好文 时间:
2020-04-16 22:50:39
阅读次数:
182
https://www.luogu.com.cn/problem/P3747 已经记不请上一次遇到扩展欧拉定理是什么时候了。 $a^b~mod~p=$ $bp0$后,都和$cnt=p0+1$时的值一样 注意是和$cnt=p0+1$时的值一样,为了方便,多开一位: 用线段树维护区间$cnt$最小值,如 ...
分类:
其他好文 时间:
2020-04-16 22:10:59
阅读次数:
72
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2553 Problem Description 在N*N的方格棋盘放置了N个皇后,使得它们不相互攻击(即任意2个皇后不允许处在同一排,同一列,也不允许处在与棋盘边框成45角的斜线上。你的任务是,对于给定的 ...
分类:
其他好文 时间:
2020-04-16 19:23:08
阅读次数:
70
Description 有两个长度都为N的序列A和B,在A和B中各取一个数相加可以得到N2个和,求这N2个和中最小的N个。 Input 第一行一个正整数N(1 <= N <= 100000)。 第二行N个整数Ai,满足Ai <= Ai+1且Ai <= 109 第三行N个整数Bi,满足Bi <= Bi ...
分类:
其他好文 时间:
2020-04-16 13:11:16
阅读次数:
131
统计字符串中的单词个数,这里的单词指的是连续的不是空格的字符。 请注意,你可以假定字符串里不包括任何不可打印的字符。 示例: 输入: "Hello, my name is John"输出: 5解释: 这里的单词是指连续的不是空格的字符,所以 "Hello," 算作 1 个单词 链接:https:// ...
分类:
编程语言 时间:
2020-04-15 21:04:37
阅读次数:
67
给定一个排序数组和一个目标值,在数组中找到目标值,并返回其索引。如果目标值不存在于数组中,返回它将会被按顺序插入的位置。 你可以假设数组中无重复元素。 示例 1: 输入: [1,3,5,6], 5输出: 2示例 2: 输入: [1,3,5,6], 2输出: 1示例 3: 输入: [1,3,5,6], ...
分类:
编程语言 时间:
2020-04-15 01:05:59
阅读次数:
251
codeforces-1335-E Three Blocks Palindrome 传送门: easy:https://codeforces.com/contest/1335/problem/E1 hard:https://codeforces.com/contest/1335/problem/E2 ...
分类:
其他好文 时间:
2020-04-14 22:44:12
阅读次数:
74
我出现此错误的原因是web.xml中没有指定spring的启动配置文件applicationContext.xml的加载位置。applicationContext.xml原来再webRoot/webInfo下,后来我把applicationContext.xml放在了src根目录下了。 因此需要再w ...
分类:
其他好文 时间:
2020-04-14 20:46:54
阅读次数:
182
Time Limit: 2 sec / Memory Limit: 1024 MB ps:我的vector需要加强,用错了。 Problem Statement We have a string SS of length N consisting of R, G, and B. Find the n ...
分类:
其他好文 时间:
2020-04-14 20:41:36
阅读次数:
78