
杂题
superxtong
浮点猫
展开
-
Gym 100947I-What a Mess
I - What a Mess Time Limit:2000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u SubmitStatusPracticeGym 100947I Description standard input/output Announcement Statements Alex is a原创 2016-05-26 21:55:05 · 681 阅读 · 0 评论 -
F - Buggy Sat
Discovery Co. ltd. builds a satellite using a new kind of an intelligent camera. The camera has special software to detect cities and roads from an image, and is also able to detect every region (which原创 2016-07-23 01:18:44 · 322 阅读 · 0 评论 -
E - Lazy Math Instructor
Description A math instructor is too lazy to grade a question in the exam papers in which students are supposed to produce a complicated formula for the question asked. Students may write correct answ原创 2016-07-23 01:21:51 · 416 阅读 · 0 评论 -
Aaronson
Problem Description Recently, Peter saw the equation x0+2x1+4x2+…+2mxm=n. He wants to find a solution (x0,x1,x2,…,xm) in such a manner that ∑i=0mxi is minimum and every xi (0≤i≤m) is non-negative.Inpu原创 2016-07-24 02:06:10 · 525 阅读 · 0 评论 -
Bellovin
链接:http://acm.hdu.edu.cn/showproblem.php?pid=5748题意:对每一位的最长上升子序列,求出另一个序列。例如:12435。对第一位:1 对第二位:12 对第三位:124 对第四位:124 对第五位:1245所以结果就是:12334。所以对每一位都求一下最长上升子序列就好啦。#include <cstdio>#include <algorithm>原创 2016-07-24 02:16:18 · 383 阅读 · 0 评论 -
USACO-The Tamworth Two
A pair of cows is loose somewhere in the forest. Farmer John is lending his expertise to their capture. Your task is to model their behavior.The chase takes place on a 10 by 10 planar grid. Squares can原创 2016-06-17 01:13:50 · 259 阅读 · 0 评论 -
USACO-Fractions to Decimals
Write a program that will accept a fraction of the form N/D, where N is the numerator and D is the denominator and print the decimal representation. If the decimal representation has a repeating sequen原创 2016-06-21 11:29:23 · 302 阅读 · 0 评论 -
HDU5778之暴力枚举
absTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 391 Accepted Submission(s): 137Problem Description Given a number x, ask positive inte原创 2016-07-31 01:37:33 · 1150 阅读 · 0 评论 -
HDU5821之映射
题目传送门: http://acm.hdu.edu.cn/showproblem.php?pid=5821题意:给我们一个初始序列和目标序列,然后给m次操作,每次操作能修改从l到r的球的位置,问m次操作后能否得到最终序列。我们可以先将目标序列每个数的出现顺序和初始序列做一个映射,然后对于每次操作,在操作区间内排序,看最后得到的序列是否是1到n就可以了。代码:#include <cstdio>#in原创 2016-08-11 23:47:54 · 430 阅读 · 0 评论 -
UVALive 4636 B - Cubist Artwork
Description Download as PDF International Center for Picassonian Cubism is a Spanish national museum of cubist artworks, dedicated to Pablo Picasso. The center held a competition for an artwork that原创 2016-07-11 01:05:25 · 506 阅读 · 0 评论 -
USACO-Longest Prefix
The structure of some biological objects is represented by the sequence of their constituents, where each part is denoted by an uppercase letter. Biologists are interested in decomposing a long sequenc原创 2016-06-05 17:44:22 · 271 阅读 · 0 评论 -
Gym 100947K-Jpeg
Description standard input/output Announcement Statements In computing, JPEG is a commonly used method of lossy compression for digital images, particularly for those images produced by digital ph原创 2016-05-27 21:39:54 · 379 阅读 · 0 评论 -
HDU 3711 D - Binary Number
Description For 2 non-negative integers x and y, f(x, y) is defined as the number of different bits in the binary format of x and y. For example, f(2, 3)=1,f(0, 3)=2, f(5, 10)=4. Now given 2 sets of n原创 2016-06-01 22:22:00 · 342 阅读 · 0 评论 -
UESTC 802 E - Just a Line
Description There are NN points on a plane, among them N−1N-1 points will form a line, your task is to find the point that is not on the line.Input The first line contains a single number NN, the num原创 2016-06-01 22:38:09 · 357 阅读 · 0 评论 -
USACO-Runaround Numbers
Runaround numbers are integers with unique digits, none of which is zero (e.g., 81362) that also have an interesting property, exemplified by this demonstration:If you start at the left digit (8 in our原创 2016-06-03 01:19:41 · 362 阅读 · 0 评论 -
Gym 100269G-Garage
Problem G. Garage Input file: garage.in Output file: garage.out Time limit: 2 seconds Memory limit: 256 megabytes Wow! What a lucky day! Your company has just won a social contract for building a原创 2016-06-03 14:30:09 · 471 阅读 · 0 评论 -
Gym 100269B-Ballot Analyzing Device
Input file: bad.in Output file: bad.out Time limit: 2 seconds Memory limit: 256 megabytes Election committee of Flatland is preparing for presidential elections. To minimize human factor in ballot原创 2016-06-03 14:42:18 · 386 阅读 · 0 评论 -
FZU 2111J - Min Number
Description Now you are given one non-negative integer n in 10-base notation, it will only contain digits (‘0’-‘9’). You are allowed to choose 2 integers i and j, such that: i!=j, 1≤i#include <cstdio>原创 2016-06-03 15:12:58 · 337 阅读 · 0 评论 -
Gym 100947B- 8 Queens, Again!!
Description standard input/output Announcement Statements Yaaaay, Haven’t you heard the news? Bakaloria results are out! And Reem had very good grades. Finally she can go to IT college and pursue原创 2016-05-23 10:04:42 · 684 阅读 · 0 评论 -
USACO-Party Lamps
Party Lamps IOI 98 To brighten up the gala dinner of the IOI’98 we have a set of N (10 <= N <= 100) colored lamps numbered from 1 to N.The lamps are connected to four buttons:Button 1: When this butt原创 2016-06-05 15:15:36 · 346 阅读 · 0 评论 -
Gym 100947C- Rotate It !!
可以看成一个环,每个环,可以从每个环开始取,问最大的取值是多少. 数字是偶数个,很简单,直接就是求奇数位置和偶数位置之和的最大值 数字是奇数个, 分析可以知道,一定有相邻的两个数字在选中的序列中,那么只需要枚举相邻两个序列,计算最大值即可. 比如样例 1 5 3 2 4, 刚开始 1 4 相连,然后是 15,一次类推, 如果只是看样例的格式,即1 5 3 2 4 来看,设相邻两个数字是i转载 2016-05-23 10:01:05 · 307 阅读 · 0 评论