- 博客(83)
- 收藏
- 关注
原创 Lightoj [基础题系列] 1136 - Division by 3
攻克lightoj基础题系列 给你两个数(在本题中5代表的数是12345为1到五的等差数列,其他数也如此),求两个数之间三的倍数的数的个数,明显的暴力超时,但规律易得,每三个数内都有两个数为三的倍数,把情况讨论一下就可以了。#include <iostream>#include <cstdio>using namespace std;int main(){ int t
2015-09-28 16:36:58
746
原创 [hdu5437] Alisha’s Party(优先队列)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5437题目大意:Alisha 要举办一个派对,但是他家里的大厅大小有限,所以他一次只能让几个人进来,来的人都会带一份礼物,每个礼物都会有自己的价值。然后进屋子的顺序是以礼物的价值为第一考虑因素,如果礼物价值一样,谁先到就谁先进。总共有k个人会来,Alisha会开m次门,会询问q次。**当开了m次门之后,如
2015-09-16 16:45:16
537
原创 NOJ [1078] Wizards and Demonstration
问题描述Some country is populated by wizards. They want to organize a demonstration.There are n people living in the city, x of them are the wizards who will surely go to the demonstration
2014-06-17 14:19:32
647
原创 NOJ [1135] Hexadecimal RGB Color
问题描述In programming, Photoshop and some other areas, the color always displayed in hexadecimal. The format is #RRGGBB. For example, red is #FF0000.Now we define that a color RRGGBB is rigorou
2014-06-17 14:17:09
903
原创 NOJ [1116] Flandre's Passageway
问题描述Flandre Scarlet(フランドール·スカーレット) is a vampire of The Embodiment of Scarlet Devil. But she is unfortunate because she is always in the undercroft.The undercroft has so many rooms signed as ro
2014-06-17 13:38:42
663
原创 NOJ [1305] Cat VS Dog
问题描述The zoo have N cats and M dogs, today there are P children visiting the zoo, each child has a like-animal and a dislike-animal, if the child's like-animal is a cat, then his/hers dislike-anima
2014-06-16 22:10:54
667
原创 NOJ [1118] Marisa's Affair
问题描述Everyone knows that Kirisame Marisa(きりさめ·まりさ) often has affaires with other witches in TouHou.For example, she has an affair with Reimu today and tomorrow is Flandre.You have to make cle
2014-06-16 11:18:50
536
原创 NOJ [1263] All Kill
问题描述Now is the Z country's extraordinary period,Ning x City broke out in a procession, the relevant departments accidentally get some data, by analysis, this is M country' ciphertext. . . Now, w
2014-06-15 16:21:22
526
原创 NOJ [1046]整数划分
问题描述题目很简单,把一个正整数分割成N个正整数之和。但是你得把所有的划分方法列出来,以字典序升序排序。对于每种划分方法,小的数字在前面。输入有多组数据,以EOF结尾。每行一个数字N(1 ≤ N ≤ 50),代表你要划分的整数。输出对于每组数据,以字典序升序输出每种划分方法。每个数字之间以空格隔开,每种划分方法以回车隔开。数据组之间不需要空行。样例输入7样例输出1 1 1 1
2014-06-14 11:11:57
697
原创 NOJ [1220] SPY
问题描述The National Intelligence Council of X Nation receives a piece of credible information that Nation Y will send spies to steal Nation X’sconfidential paper. So the commander of The
2014-06-12 22:17:32
522
原创 NOJ [1157] Electrical Outlets
超级大水题,不多说#includeint main(){ int t,n,temp; while(~scanf("%d",&t)) { while(t--) { scanf("%d",&n); int all=0; int m=n; while(n--) { scanf("%d",&temp); all+=temp;
2014-06-06 14:36:20
437
原创 NOJ [1251] Find the Palindrome
[1251] Find the PalindromeThe problem is pretty easy, giving you a very long string, you have to find the first longest palindrome in the string. (Case-insensitive)输入First line con
2014-06-06 14:27:43
455
原创 NOJ [1445] Lottery Draw
问题描述Now, there is a new play about lottery draw. Give you a matrix with N * N integers, you can choose a A * B(0 So, can you find the maximum sum in the matrix? You can also give up this time
2014-06-06 09:31:25
721
原创 [1170] Steps
问题描述One steps through integer points of the straight line. The length of a step must be nonnegative and can be by one bigger than, equal to, or by one smaller than the length of the previous step.
2014-06-04 09:31:21
513
原创 NOJ [1380] 老蔡买水果 && [1180] Appreciate the Landscape
这两题很类似,都是KMP的简单题,可怜的我今日才明白了next数组的含义,于是来尝试了下这两题
2014-06-03 21:35:42
711
原创 [1119] Patchouli's Books
问题描述Patchouli Knowledge(パチュリー·ノーレッジ) is the owner of the Embodiment of Scarlet Devil library. She often shelves books time by time.For she is careless, Patchouli treats all the books in the sa
2014-06-03 19:09:21
802
原创 [1408] Dolly Song
问题描述Please listen to this song. Is it familiar?You know, the lyrics is "ba la du la di li @&**(&#(!*@&#(*!@&#(*!@&#". Well it's just a joke.We need you to caculate how many syllables
2014-06-03 17:05:24
516
原创 NOJ [1374] Find The Law
问题描述Do for n , m , n define n hex , m define the m string(1 For example , 2 hex , 1 , 10 , 11 ,100 , 101 , 110....so on.If m = 3 ,we should printf the 3th string 11. Then if m = 4, printf 100.
2014-06-02 22:08:49
537
原创 NOJ [1184] Elaine's Queue
问题描述Just these days, we've learned about "Queue". It's a kind of data structure.Elaine is cranky. She made her own Queue.That Queue only has two operations:Top x : Make the eleme
2014-05-30 09:39:01
597
原创 NOJ [1122] Shameimaru's Candid Camera
[1122] Shameimaru's Candid Camera问题描述Shameimaru Aya(しゃめいまる·あや) likes to photograph others secretly. So she plans to set some photo point in the map.Once she has set all the photo point
2014-05-28 21:49:54
590
原创 NOJ [1373] Endless Tree
问题描述There is a endless binary tree, just like the image below. The big boss is in the root, you and your teammate, were transmitted to two nodes -- Nth node and Mth node. In this tree, you can o
2014-05-27 21:45:11
440
原创 NOJ [1231] Fizz
问题描述潮汐海灵是LOL里面的一个英雄。etond很喜欢它,etond叫它小鱼。它有四个技能。分别是淘气打击[ Q ]、海石三叉戟[ W ]、古灵精怪[ E ]、巨鲨强袭[ R ]。分别用键盘上的QWER四个键来施放。技能如果成功施放的话,就以如下规则输出相应字符。1.Q技能成功施放,输出"Rush~~~"2.W技能成功施放,输出"Buff~~~"3.E技能
2014-05-27 18:51:18
512
原创 [1355] Heaven Needn't Use Money
问题描述都说死后上天堂多好多好,但是实际上天堂也是要花钱的。天堂中央银行发行了一种金卡。只要卡里的天堂币(冥币?)大于等于5¥,你就可以购买任何一样东西(就算卡里钱变为负数)。如果卡里钱少于5¥,你将无法购买任何东西(就算那东西1¥)。天堂中有n种物品出售,每种物品可购买一次。现在Lucifer想刷爆他的金卡,使他卡里的钱最少。请你帮忙算一下Lucifer卡里钱最少为几¥。输入
2014-05-27 16:21:21
516
原创 NOJ [1064] Galaxy
问题描述输入This problem contains several cases.The first line of each case is an integer N (0 Then it follows N line(s). Each line contains 4 integers: The two coo
2014-05-26 21:41:34
694
原创 NOJ [1186] Get the Width
问题描述It's an easy problem. I will give you a binary tree. You just need to tell me the width of the binary tree.The width of a binary tree means the maximum number of nodes in a same level.
2014-05-26 16:47:42
462
原创 NOJ [1039] Arrival of the General
问题描述A Ministry for Defense sent a general to inspect the Super Secret Military Squad under the command of the Colonel SuperDuper. Having learned the news, the colonel ordered to all n squad so
2014-05-24 18:05:20
507
原创 NOJ [1006] DOTA
问题描述DOTA是一个基于魔兽争霸的5V5 RPG地图。它风靡全世界,相信很多同学都玩过,当然没玩过也没有关系。首先简单介绍一下游戏,它的目的是守护自己的远古遗迹(近卫方的生命之树、天灾方的冰封王座),同时摧毁对方的远古遗迹。为了到达对方的远古遗迹,一方英雄必须战胜对方的部队、防御建筑和英雄。我们的问题来了~~~当一个英雄杀死敌方的时候,如果符合某种条件,该英雄就会获得一些称号。我们的
2014-05-23 21:46:44
830
原创 NOJ [1265] Flandre's Second Escape
问题描述Congratulation! Under your help Flandre Scarlet passed Level one. Now, she faces a hander Level. Do you want to know it? HaHa! Guess it by yourself~ = =.Go To Topic,this level goal is walk a
2014-05-22 21:29:26
469
原创 NOJ [1328] TT Had a Cow
问题描述Smart TT across the maze safety, she met the big boss! Boss used his power again, then many pillars Drilled out from ground, that hurt TT's army seriously. TT was very angry, luckily, TT also
2014-05-21 23:08:48
425
原创 NOJ [1187] Hole Breaker
问题描述XadillaX wants a big hole to store some *&@#(*&@!#(*&!)(@&#^& things. So he bought a Hole Breaker.The ground is an N * N square. The breaker will break a 1 * 1 square hole in the ground
2014-05-20 18:35:22
429
原创 NOJ [1246] Virtual Friends
问题描述These days, you can do all sorts of things online. For example, you can use various websites to make virtual friends. For some people, growing their social network (their friends, their frie
2014-05-19 23:22:50
359
原创 NOJ [1314] Brave Sword [1416] Clear Up
这两题换汤不换药都是求出在数组里只出现一次的数其实有很多方法,例如哈希,位运算我用的是weiynsua
2014-05-19 21:50:54
877
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人