
简单的签到题
文章平均质量分 51
HelloWorld10086
追随大神的脚步
展开
-
UVA - 10071 Back to High School Physics
Problem B Back to High School PhysicsInput: standard inputOutput: standard output A particle has initial velocity and constant acceleration. If its velocity after certain time is v then wha原创 2014-07-30 10:34:09 · 957 阅读 · 0 评论 -
CodeChef JNTUV1(找规律)
题目大意: 给你这样一个序列3, 4, 33, 34, 43, 44, 333, 334, 343, 344, 433, 434, 443, 444, 3333, 3334, 3343, 3344……..,找到其中的规律,输入n,输出对应的数字。解析: 可以把这个序列等价于一个二进制0, 1, 00, 01, 10, 11,模拟这个序列的生成就ok了。#include <cstdio>#inc原创 2015-02-22 21:53:28 · 599 阅读 · 0 评论 -
FZU 2064(暴力求解)
A - 找位置Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmit Status Practice FZU 2064Description一年一次的FZUACM宣讲会又开始 了,kk和几个同学到的时候位置已经不多了。但是他们又想坐在同一排而且位原创 2014-08-29 18:34:25 · 753 阅读 · 0 评论 -
CodeForces - 518B Tanya and Postcard(水题)
题意: 字母相同,且大小写相同叫一次”YAY” 字母相同,大小写不同叫一次”WHOOP” 输出 最大YAY的个数,和最大YAY的个数的情况下,WHOOP的个数。解析: 将用过的字符串标记一下,最后进行统计,详见代码。AC代码:#include <cstdio>#include <cstring>#include <algorithm>#include <cma原创 2015-02-25 18:30:28 · 935 阅读 · 0 评论 -
UVA 1339 - Ancient Cipherguo(水题)
题意: 给定2个字符串,判断做一个映射后能否一一对应。思路: 把每个字母个数保存下来,排序,看能否一一对应即可。AC代码#include <cstdio>#include <cstring>#include <algorithm>#include <cmath>#include <cstdlib>using namespace std;typedef long long ll原创 2015-02-26 16:42:59 · 785 阅读 · 0 评论 -
CodeForces - 518A Vitaly and Strings(水题)
题意: 输入两个字符串s和t(只由小写字符组成),两个字符串的长度相同,s的字典序 < t的字典序。求一个字符串其字典序介于s和t之间。解析: 显然求s的字典序+1最好,但是要保证最后是z的时候,要将当前位变为a,并且将下一位+1。AC代码:#include <cstdio>#include <cstring>#include <algorithm>#include <cmath>原创 2015-02-25 18:23:55 · 1286 阅读 · 0 评论 -
Hdu 5174 Ferries Wheel(模拟)
题意: 有n个人,每个人有一个值那是缆车的值 比如 1 2 2 3 7 5 就是有5个缆车,6个人 5个缆车的编号为1 2 3 5 7 2 3缆车可以满足条件,在2 3缆车上有3个人,所以亲3下解析: 先排序,添加首尾,并模拟计算。注意: 缆车的值要用long long保存,不然会爆掉WA。AC代码#include <cstdio>#include <cs原创 2015-02-26 16:25:08 · 1033 阅读 · 0 评论 -
hdu 5417 Victor and Machine(模拟)
题意: Victor有一个机器,这个机器每次开启的瞬间会弹出一个小球,之后每隔www秒会弹出一个小球。因为机器不是很完善,该机器每开启xxx秒就得关闭yyy秒进行调整,在机器关闭的瞬间可能会有小球弹出,关闭之后一直到下一次开启之前都不会有小球弹出。 0时刻,机器第一次开启,Victor想要知道第nnn个小球弹出的时刻,你能够告诉他吗?解析: 直接模拟就好了。mymy codec原创 2015-08-23 09:56:43 · 547 阅读 · 0 评论 -
Codeforces 558A Lala Land and Apple Trees(水题)
题意: n棵苹果树在x轴上排成一排,每棵苹果树有一个坐标值(均不为0)和苹果数量。现在某人从0开始任意选择一个方向走,每遇到一颗新的苹果树就摘下所有苹果,然后掉转方向直到遇到下一颗之前没遇到过的苹果树然后再摘下所有苹果,如此往复直到再也遇不到新的苹果树。问最多能摘下多少个苹果。解析 以0为中心,对坐标排序后。先朝着左边走模拟一遍,再朝着右边走模拟一遍,取最小的输出就是最终答案。mymy原创 2015-07-15 16:02:36 · 779 阅读 · 0 评论 -
CodeForces 305A Strange Addition(想法题)
题意: Vasya这个人只会两个数字的加法,这两个个数字aa和bb满足,他们的每位上至少有一个0。 例如: 505 和 50 可以竖着看 500 050 每位上面都有一个0,而 1 和 4 没有。 现在题目给你由0~100组成的数组dd,问在这个数组dd中是否存在着一个最大的集合,使得任意两个数字都可以相加。解析: 想法题,每个数字范围是0~100原创 2015-07-18 19:40:57 · 541 阅读 · 0 评论 -
hdu 5373 The shortest problem(模拟)
题意: 给你一个数n和操作次数t,每次操作将n的各位数之和求出来放在n的末尾形成新的n,问t次操作后得到的n是否可以被11整除。解析: 百度了一下能被11整除的数的性质,就是:当一个数的奇数位之和与偶数位之和的差的绝对值能被11整除,那么该数就可以被11整除。如35816,奇数位之和为17,偶数位之和是6,差的绝对值为11,所以能被11整除。 对于每次操作,记录下奇数位置上的和,以及原创 2015-08-12 10:52:07 · 711 阅读 · 0 评论 -
hdu 5327 Olympiad(前缀和)
解析: 直接处理出前缀和,然后就可以用O(1)的复杂度,离线查询。mymy codecode#include <cstdio>#include <cstring>#include <algorithm>using namespace std;const int N = 100005;int sum[N];bool vis[10];bool judge(int num) {原创 2015-07-30 20:09:00 · 1174 阅读 · 0 评论 -
hdu 5319 Painter(模拟题)
题意: 给你一个空白的图,你可以随意选几个连续的斜格子画线,红色只能\着画,蓝色只能/着画,每个格子只能被红线和蓝线涂一次,如何一个格子既有红色又有蓝色,就变成了绿色,给定你一个图,问至少画几条线。解析: 水题,直接模拟。mymy codecode#include <cstdio>#include <cstring>#include <algorithm>using namespa原创 2015-07-30 20:03:37 · 1006 阅读 · 0 评论 -
FZU - 2102 Solve equation(水题)
题意:求满足A=k*B+d的最大的k值和d值,输出k,d的值解析:A,B由C进制转化过来的,最大的K值只要直接用A/B,最大d值为A%B#include #include #include #include using namespace std;const int N = 100;char str1[N],str2[N];int main() { int a,b,base原创 2014-11-24 15:40:00 · 601 阅读 · 0 评论 -
Codeforces 363A Soroban(算盘模拟)
题目大意:算盘模拟题,从小到大来看,左边珠子向右移动一格为5,右边珠子向左边移动一格+1原创 2014-10-20 15:10:22 · 1164 阅读 · 0 评论 -
HDU 2212 DFS(水题)
题目大意:求出1到2147483647,中每位的阶乘的和等于该数的数。如1!+4!+5!=145解析:水题,直接求解+打表。原创 2014-10-13 15:01:05 · 793 阅读 · 0 评论 -
UVA - 10055 Hashmat the brave warrior
Problem A Hashmat the brave warriorInput: standard inputOutput: standard output Hashmat is a brave warrior who with his group of young soldiers moves from one place to another to fight原创 2014-07-30 10:24:22 · 858 阅读 · 0 评论 -
UVA - 494 Kindergarten Counting Game
Kindergarten Counting Game Everybody sit down in a circle. Ok. Listen to me carefully. ``Woooooo, you scwewy wabbit!'' Now, could someone tell me how many words I just said? Input an原创 2014-07-30 14:25:56 · 729 阅读 · 0 评论 -
UVA 458 The Decoder
The Decoder Write a complete program that will correctly decode a set of characters into a valid message. Your program should read a given file of a simple coded set of characters and prin原创 2014-07-30 11:17:32 · 747 阅读 · 0 评论 -
UVA - 445 Marvelous Mazes
Marvelous Mazes Your mission, if you decide to accept it, is to create a maze drawing program. A maze will consist of the alphabetic charactersA-Z, * (asterisk), and spaces. Input and原创 2014-07-30 18:35:34 · 658 阅读 · 0 评论 -
UVA - 414 Machined Surfaces
Machined Surfaces An imaging device furnishes digital images of two machined surfaces that eventually will be assembled in contact with each other. The roughness of this final contact is t原创 2014-07-30 15:25:23 · 630 阅读 · 0 评论 -
UVA - 490 Rotating Sentences
Rotating Sentences In ``Rotating Sentences,'' you are asked to rotate a series of input sentences 90 degrees clockwise. So instead of displaying the input sentences from left to right and原创 2014-07-30 16:12:40 · 692 阅读 · 0 评论 -
UVA - 488 Triangle Wave(水题)
Triangle Wave In this problem you are to generate a triangular wave form according to a specified pair of Amplitude and Frequency.Input and OutputThe input begins with a single positive原创 2014-08-20 20:06:01 · 1093 阅读 · 0 评论 -
UVA - 489 Hangman Judge(set应用)
Hangman Judge In ``Hangman Judge,'' you are to write a program that judges a series of Hangman games. For each game, the answer to the puzzle is given as well as the guesses. Rules are the原创 2014-08-21 10:08:49 · 921 阅读 · 0 评论 -
UVA - 10300 Ecological Premium(水题)
Problem AEcological PremiumInput: standard inputOutput: standard outputTime Limit: 1 secondMemory Limit: 32 MBGerman farmers are given a premium depending on the conditions at their farmya原创 2014-08-22 09:05:49 · 794 阅读 · 0 评论 -
UVA - 694 The Collatz Sequence(水题)
The Collatz Sequence An algorithm given by Lothar Collatz produces sequences of integers, and is described as follows:Step 1:Choose an arbitrary positive integer A as the first item in原创 2014-08-22 18:34:21 · 795 阅读 · 0 评论 -
CodeForces 430A Points and Segments
DescriptionIahub isn't well prepared on geometry problems, but he heard that this year there will be a lot of geometry problems on the IOI selection camp. Scared, Iahub locked himself in the basem原创 2014-08-10 19:52:57 · 792 阅读 · 0 评论 -
UVA - 457 Linear Cellular Automata(水题)
Linear Cellular Automata A biologist is experimenting with DNA modification of bacterial colonies being grown in a linear array of culture dishes. By changing the DNA, he is able ``program" th原创 2014-08-23 16:06:53 · 886 阅读 · 0 评论 -
hdu 5328 Problem Killer(水题)
题意: 意思是给出你一个数组,判断里面最长的一个区间,区间里的数要么为等比数列,要么为等差数列,也可以两个都是。解析: 从前往后扫,分别用两个数来记录等差数列的差值和等比数列的比值,不断比较前面一个和后面一个的差值和比值,如果不相等,维护区间长度和差值或比值。mymy codecode#include <cstdio>#include <cstring>#include <algor原创 2015-07-30 20:16:48 · 503 阅读 · 0 评论