
水题
文章平均质量分 52
NineFailure
这个作者很懒,什么都没留下…
展开
-
codeforces841c(99/600)
C. Leha and Function time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Leha like all kinds of strange things. Recently he liked the function原创 2017-08-25 10:12:58 · 374 阅读 · 0 评论 -
codeforces 453A
A. Little Pony and Expected Maximum time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Twilight Sparkle was playing Ludo with her friends Rain原创 2017-03-21 13:01:24 · 450 阅读 · 0 评论 -
Codeforces Round #345 (Div. 2) C
C. Watchmen time limit per test3 seconds memory limit per test256 megabytes inputstandard input outputstandard output Watchmen are in a danger and Doctor Manhattan together with his friend Daniel原创 2017-02-04 00:31:31 · 366 阅读 · 0 评论 -
Codeforces Round #322 (Div. 2)C
C. Developing Skills time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Petya loves computer games. Finally a game that he’s been waiting for原创 2017-02-09 17:40:01 · 268 阅读 · 0 评论 -
Codeforces Round #323 (Div. 2)C
The GCD table G of size n × n for an array of positive integers a of length n is defined by formulaLet us remind you that the greatest common divisor (GCD) of two positive integers x and y is the great原创 2017-01-14 15:15:35 · 281 阅读 · 0 评论 -
CodeForces742b
There are some beautiful girls in Arpa’s land as mentioned before.Once Arpa came up with an obvious problem:Given an array and a number x, count the number of pairs of indices i, j (1 ≤ i < j ≤ n) such原创 2016-12-07 18:41:37 · 567 阅读 · 0 评论 -
HDU1045 水dfs....数据量太小了才16.....
#include<iostream>#include<string>#include<memory.h>#include<algorithm>using namespace std;int n;string tut[5];int biaoji[5][5];int inf=0x3f3f3f3f;int dfs(int x,int y){ for(int s=x+1;s<n;原创 2016-10-16 16:15:38 · 735 阅读 · 0 评论 -
lightoj 1012 水广搜。。。最近我脑子不大好了
#include<iostream>#include<cstdio>#include<string>#include<algorithm>#include<queue>#include<string>using namespace std;string w[30];int xingzou[4][2]={{0,1},{1,0},{-1,0},{0,-1}};struct p{原创 2016-09-29 13:28:42 · 440 阅读 · 0 评论 -
lightoj 1019 模板dijkstra
#include<iostream>#include<algorithm>#include<cstdio>#include<cmath>#include<memory.h>using namespace std;int dis[101];int tu[101][101];int yijing[101];int inf=0x3f3f3f3f;int main(){ int原创 2016-09-28 21:41:09 · 357 阅读 · 0 评论 -
lightoj 1016 水贪心
#include<iostream>#include<cstdio>#include<memory.h>#include<cstdio>#include<algorithm>#include<map>using namespace std;int tu[50001];int n, k;int main(){ int T; cin >> T; int u =原创 2016-09-28 21:19:39 · 336 阅读 · 0 评论 -
lightoj 1015 弱智
#include<iostream>#include<cstdio>#include<memory.h>#include<algorithm>#include<iomanip>#include<map>using namespace std;int main(){ int T; cin>>T; int u=0; while(T--) {原创 2016-09-28 18:00:48 · 211 阅读 · 0 评论 -
CodeForces - 735C
Famous Brazil city Rio de Janeiro holds a tennis tournament and Ostap Bender doesn’t want to miss this event. There will be n players participating, and the tournament will follow knockout rules from t原创 2017-05-12 14:24:36 · 298 阅读 · 0 评论 -
CodeForces - 703B
Little Mishka is a great traveller and she visited many countries. After thinking about where to travel this time, she chose XXX — beautiful, but little-known northern country.Here are some interesting原创 2017-05-13 11:05:08 · 338 阅读 · 0 评论 -
CodeForces - 165C
A string is binary, if it consists only of characters “0” and “1”.String v is a substring of string w if it has a non-zero length and can be read starting from some position in string w. For example, s原创 2017-05-15 01:11:05 · 465 阅读 · 0 评论 -
HDU - 4821(95/600)字符串水题
Given a string S and two integers L and M, we consider a substring of S as “recoverable” if and only if (i) It is of length M*L; (ii) It can be constructed by concatenating M “diversified” subs原创 2017-08-16 18:16:59 · 871 阅读 · 0 评论 -
HDU - 1846(33/600)
是十分水的巴什博弈呢#include<iostream>#include<cstring>#include<cstdio>#include<algorithm>using namespace std;int main(){ int T; cin >> T; while (T--) { int n, m; cin >> n >原创 2017-07-09 21:26:11 · 259 阅读 · 0 评论 -
HDU - 5813(68/600)
Being an ACMer requires knowledge in many fields, because problems in this contest may use physics, biology, and even musicology as background. And now in this problem, you are being a city architect!原创 2017-07-29 14:38:20 · 327 阅读 · 0 评论 -
LightOJ - 1248 (27/600)
Given a dice with n sides, you have to find the expected number of times you have to throw that dice to see all its faces at least once. Assume that the dice is fair, that means when you throw the dice原创 2017-07-04 14:14:53 · 356 阅读 · 0 评论 -
LightOJ - 1030(21/600)
You are in a cave, a long cave! The cave can be represented by a 1 x N grid. Each cell of the cave can contain any amount of gold.Initially you are in position 1. Now each turn you throw a perfect 6 si原创 2017-07-03 09:45:38 · 274 阅读 · 0 评论 -
HDU - 2897(38/600)
当日遇到月,于是有了明。当我遇到了你,便成了侣。 那天,日月相会,我见到了你。而且,大地失去了光辉,你我是否成侣?这注定是个凄美的故事。(以上是废话) 小t和所有世俗的人们一样,期待那百年难遇的日食。驻足街头看天,看日月渐渐走近,小t的脖子那个酸呀(他坚持这个姿势已经有半个多小时啦)。他低下仰起的头,环顾四周。忽然发现身边竟站着位漂亮的mm。天渐渐暗下,这mm在这街头竟然如此耀眼,她是天使吗原创 2017-07-11 20:05:18 · 297 阅读 · 0 评论 -
Codeforces 796D(36/600)
Inzane finally found Zane with a lot of money to spare, so they together decided to establish a country of their own.Ruling a country is not an easy job. Thieves and terrorists are always ready to ruin原创 2017-07-11 00:03:42 · 367 阅读 · 0 评论 -
HDU4907 (4/600)
有一台机器,并且给你这台机器的工作表,工作表上有n个任务,机器在ti时间执行第i个任务,1秒即可完成1个任务。 有m个询问,每个询问有一个数字q,表示如果在q时间有一个工作表之外的任务请求,请计算何时这个任务才能被执行。 机器总是按照工作表执行,当机器空闲时立即执行工作表之外的任务请求。 Input 输入的第一行包含一个整数T, 表示一共有T组测试数据。 对于每组测试数据: 第一行是原创 2017-06-08 22:52:54 · 280 阅读 · 0 评论 -
CodeForces - 812B
Some people leave the lights at their workplaces on when they leave that is a waste of resources. As a hausmeister of DHBW, Sagheer waits till all students and professors leave the university building,原创 2017-06-03 22:58:16 · 661 阅读 · 0 评论 -
CodeForces - 779B
Polycarp is crazy about round numbers. He especially likes the numbers divisible by 10k.In the given number of n Polycarp wants to remove the least number of digits to get a number that is divisible by原创 2017-05-18 10:36:22 · 376 阅读 · 0 评论 -
lightoj 1014 求一个数的所有因子
这个题一开始我求了k的所有质因子和其指数的值 用dfs求得所有因子但是超时了… 百度一下暴力… 好了记住以后这种破玩意就是暴力… mdzz#include<iostream>#include<cstdio>#include<memory.h>#include<algorithm>#include<iomanip>#include<map>using namespace std;原创 2016-09-28 17:54:49 · 592 阅读 · 0 评论 -
lightoj 1028 xjb组合
We know what a base of a number is and what the properties are. For example, we use decimal number system, where the base is 10 and we use the symbols - {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}. But in different原创 2016-11-04 20:53:29 · 710 阅读 · 1 评论 -
HDU1029
学长们把他放在DP里 … 不太明白 明明超级水啊#include<iostream>#include<cmath>#include<cstdio>#include<string>#include<algorithm>#include<memory.h>#include<stack>using namespace std;int dp[999999];int main(){原创 2016-07-28 18:48:10 · 272 阅读 · 0 评论 -
HDU1108求个最大公因数
水.. 主要是最大公因数要忘干净了#include<iostream>#include<string>#include<cmath>#include<algorithm>#include<memory.h>using namespace std;long long shu[1200];int ge;void jinqu(string qq){ long long s=0;原创 2016-07-27 11:05:47 · 484 阅读 · 0 评论 -
HDU1106
水题但是有坑 要注意第一个是5的情况和最后一个没处理的情况#include<iostream>#include<string>#include<cmath>#include<algorithm>#include<memory.h>using namespace std;long long shu[1200];int ge;void jinqu(string qq){ lo原创 2016-07-27 10:38:10 · 395 阅读 · 0 评论 -
求最大值....
这题讲道理这贪心策略我自我感觉良好…… 先从左边求最大,再从右边求最小 如果从左边找到了比右边还小的 那么久更新差值 反之同理 描述 给定n个数,a[1]到a[n],请你帮忙找出a[i] - a[j]的最大值,其中1 <= i < j <= n输入 第一行一个数T,表示一共有T组数据(T <= 20); 每组测试数据第一行一个整数n(2 <= n <= 10 ^ 5),表示接下来有n个原创 2016-07-15 17:31:36 · 418 阅读 · 0 评论 -
HDU1006
我只是想存一下这些水题的代码#include<iostream>#include<algorithm>#include<cmath>#include<iomanip>using namespace std;int main(){ int n; while (cin >> n) { if (n == -1)break; int sum原创 2016-07-14 11:27:26 · 251 阅读 · 0 评论 -
HDU1016
都很水…#include<iostream>#include<string>#include<cmath>#include<algorithm>#include<queue>#include<stack>#include<cstring>using namespace std;int prime[38] = { 0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,原创 2016-07-14 11:25:47 · 344 阅读 · 0 评论 -
HDU1012打表之魂永流传
灵魂打表 别揍我….#include<iostream>using namespace std;double jie[10];int main(){ printf("n e\n- -----------\n"); printf("0 1\n1 2\n2 2.5\n3 2.666666667\n4 2.708333333\n5 2.716666667\n6 2.7180555原创 2016-07-14 11:23:42 · 427 阅读 · 0 评论 -
HDU1019
超级水题还要什么题解….#include<iostream>#include<cmath>#include<algorithm>using namespace std;int gcd(int a, int b){ if (b == 0) return a; return gcd(b, a%b);}int main(){//?4 294 967 296 int原创 2016-07-14 11:21:57 · 223 阅读 · 0 评论 -
HDU1022
十分水,就是模拟模拟就可以了…. 先把这一大堆东西放到两个队列一个栈里,栈就是站点 队列就是火车…. 如果合适就开出去不行就摞上 直到都罗进去站点还是开不动就结束 As the new term comes, the Ignatius Train Station is very busy nowadays. A lot of student want to get back to scho原创 2016-07-14 11:19:37 · 399 阅读 · 0 评论 -
HDU1019
多个数的最小公倍数原创 2016-06-29 16:24:40 · 308 阅读 · 0 评论 -
HDU1216
水模拟#include<iostream>#include<algorithm>using namespace std;long long s[999999] = { 0 };int main(){ s[0] = 1; s[1] = 1; for (int a = 2;a <= 50000;a++) { if (s[a] == 1)conti原创 2016-07-19 20:28:33 · 392 阅读 · 0 评论 -
HDU1326
水#include<iostream>#include<cstdlib>#include<memory.h>#include<map>using namespace std;int ss[500];int main(){ int n; int sd=0; while(cin>>n) { if(n==0)break; sd+原创 2016-07-22 09:27:09 · 392 阅读 · 0 评论 -
lightoj 1200 水完全背包
把他需要的重量减掉来一个完全背包#include<iostream>#include<cstdio>#include<algorithm>#include<memory.h>using namespace std;int p[101];int w[101];int yao[101];int dp[10001];int n,k;int u=0;int main(){ i原创 2016-09-06 14:07:10 · 313 阅读 · 0 评论 -
lightoj 1010 找规律坑比题
Given an m x n chessboard where you want to place chess knights. You have to find the number of maximum knights that can be placed in the chessboard such that no two knights attack each other.Those who原创 2016-09-28 14:57:42 · 546 阅读 · 0 评论