
-> 技巧 <-
文章平均质量分 78
Joefery
生命不息,战斗不止。
展开
-
UVA - 11991 Easy Problem from Rujia Liu?【STL】
题目链接题意:给出一个包含n个整数的数组,你需要回答若干个询问。每次询问两个整数k和v,输出从左到右的第k个v的下标(不存在时输出0)今天学习了刘汝佳大牛的一道题的写法,对STL有了进一步的认识。另外代码中有一处有疑问,希望有哪位大虾能告诉下,不胜感激。#include#include#include#include#include#include原创 2016-06-01 20:06:23 · 515 阅读 · 0 评论 -
UVALive 7339 Owllen【思维】
题目链接/* 题意:给定一个字符串,让你构造一个字符串使得两个字符串的最长公共自序列 尽可能短,输出最短长度 类型:思维 分析:找二十六个字母中出现次数最少的,就是答案,每次构造的字符串全部用出现 最少的字符填满,如果存在没出现的字符,那长度显然为0*/#include#include#include#i原创 2016-10-26 00:58:01 · 436 阅读 · 0 评论 -
CodeForces 405D Toy Sum【思维】
DescriptionLittle Chris is very keen on his toy blocks. His teacher, however, wants Chris to solve more problems, so he decided to play a trick on Chris.There are exactly s blocks in Chris's set原创 2016-11-06 17:12:14 · 724 阅读 · 0 评论 -
CodeForces 405C Unusual Product【思维】
DescriptionLittle Chris is a huge fan of linear algebra. This time he has been given a homework about the unusual square of a square matrix.The dot product of two integer number vectors x and y原创 2016-11-06 16:55:34 · 547 阅读 · 0 评论 -
ural 1981. Parallel and Perpendicular 【规律】
1981. Parallel and PerpendicularTime limit: 0.5 secondMemory limit: 64 MBYou are given a regular n-gon. Your task is to calculate two values: the number of its diagonals that are paralle原创 2016-09-07 19:39:05 · 492 阅读 · 0 评论 -
CSU 1803 2016 【枚举】
Description 给出正整数 n 和 m,统计满足以下条件的正整数对 (a,b) 的数量:1. 1≤a≤n,1≤b≤m;2. a×b 是 2016 的倍数。Input输入包含不超过 30 组数据。每组数据包含两个整数 n,m (1≤n,m≤10 9).原创 2016-09-05 00:00:19 · 836 阅读 · 0 评论 -
ural 1987. Nested Segments【离散化+贪心+线段树】
1987. Nested SegmentsTime limit: 1.0 secondMemory limit: 64 MBYou are given n segments on a straight line. For each pair of segments it is known that they either have no common points or原创 2016-09-07 21:28:15 · 560 阅读 · 0 评论 -
CodeForces 560D Equivalent Strings【递归+贪心】
DescriptionToday on a lecture about strings Gerald learned a new definition of string equivalency. Two strings aand b of equal length are called equivalent in one of the two cases:They are e原创 2016-10-20 02:42:55 · 761 阅读 · 0 评论 -
codeforces 599 C. Day at the Beach【思维】
C. Day at the Beachtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputOne day Squidward, Spongebob and Patric原创 2016-08-17 14:43:07 · 436 阅读 · 0 评论 -
Codeforces 598B Queries on a String 【思维】
B. Queries on a Stringtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a string s and should原创 2016-08-30 21:19:41 · 807 阅读 · 0 评论 -
CodeForces 560C Gerald's Hexagon【思维】
DescriptionGerald got a very curious hexagon for his birthday. The boy found out that all the angles of the hexagon are equal to . Then he measured the length of its sides, and found that each o原创 2016-10-19 22:28:05 · 700 阅读 · 0 评论 -
Gym 101138C Stickmen【枚举+排列组合】
Descriptionstandard input/outputStatementsLimak is a little bear who loves to play with graphs. Recently, he defined a new structure in a graph and called it a stickman.A stickman is a set原创 2016-10-28 11:52:06 · 788 阅读 · 0 评论