水题
Joovo
成事不说,遂事不谏,既往不咎。
展开
-
得分SCORE UVA1585
UVA 1585Description There is an objective test result such as OOXXOXXOOO". An `O' means a correct answer of a problem and an `X' means a wrong answer. The score of each problem of this test原创 2016-11-30 13:12:14 · 454 阅读 · 0 评论 -
Round 3 Bookshelf 2 POJ - 3628 -搜索(假背包)
题目链接: POJ-3628大意: 给出每个书的高度,求怎么取能达到最接近 K 且大于 K 的值。思路:咋一看是个背包,但是数据量太小直接暴力搜索就能过。#include <iostream>#include <cstdio>#include<string>#include<cstring>#include<algorithm>using namespace std;typedef原创 2017-07-17 12:58:16 · 292 阅读 · 0 评论 -
多校6 HDU-6098 Inversion 水题以及神奇的代码操作
原题链接: HDU-6098大意:给一个串,然后生成另一个串,生成规则是(i>=2): Bi=maxi∤jAjB_{i}= \max\limits_{i\nmid j}A_{j} 限制没啥特殊的,nlogn算法思路: 暴力瞎搞即可。 排序 从后往前找 找到就 break#include <bits/stdc++.h>using namespace std;typedef long lon原创 2017-08-11 01:35:54 · 700 阅读 · 0 评论 -
Worried School HDU-6008 模拟
原题链接:HDU-6008大意:题目比较长,看的比较麻烦。理解后就是一个简单地模拟。world final 名额有 g 个,g 分为 x + y ,x 的名额从五个站点里依次抽,y 由另一个站 ec-final 里抽。但是现在不知道 x 和 y ,求某个学校能否进 wf 。能输出 ADVANCED!,否则输出他不能去 wf 的最小 y 值。思路:简单模原创 2017-09-13 23:13:52 · 626 阅读 · 0 评论 -
Hardwood Species UVA - 10226
原题链接: UVA-10226大意: 几组样例,每行给出不同物种,统计物种的占比。 Sample Inputs: 2Red Alder Ash Aspen Basswood Ash Beech Yellow Birch Ash Cherry Cottonwood Ash Cypress Red Elm Gum Hackberry White Oak Hicko原创 2017-09-03 12:49:41 · 510 阅读 · 0 评论 -
Fried Fish
原题链接 Fried Fish大意: 一个平底锅煎饼(鱼),有 N 条鱼和,一个锅煎 K 个鱼,求最少时间。思路: 鱼分为两面,面数除以 K 即可。 注意特判。#include <bits/stdc++.h>using namespace std;typedef long long ll;#define mem(s,t) memset(s,t,sizeof(s))#define D(v原创 2017-09-12 14:21:21 · 436 阅读 · 0 评论 -
#440 Div.2 D.Sorting the Coins 硬币排序问题
原题链接: sort the coins 大意: 一排硬币排成一排,有两种硬币,把其中一种按照两两交换的规则归到右侧,求需要归并多少次才能把所有这种硬币归到右侧。分析: 由于硬币是按照时间顺序放的,容易想到第n个答案和n-1个答案必然存在某种关系。找规律可以发现: 每次放置一个新的点,答案都比前一个多一,当这个点放在末尾时,相当于回退一个。 每次移动后 每个硬币就是在它的下一个非法硬币的原创 2017-10-21 15:42:59 · 507 阅读 · 0 评论 -
#440 Div.2 B. Maximum of Maximums of Minimums 水
原题链接: B. Maximum of Maximums of Minimums 大意: 分成 k 个不重合的连续子串,即一个“划分”,求最小值的最大值。分析: 被坑了,给自己长个记性,答案初始化成 0 了,最大最小值都记得初始化为inf,把答案忘了,务必把所有ans,minn,maxn初始化输入的值。具体实现:#include <bits/stdc++.h>using namespace原创 2017-10-15 20:10:42 · 294 阅读 · 0 评论 -
多校1001 HDU-6033. Add More Zero 水
题目链接:HDU 6033 快速看懂题意原创 2017-07-28 12:53:56 · 335 阅读 · 0 评论 -
多校3 HDU6065 Questionnaire 水
原题:HDU-6065水题反向考虑 多种答案原创 2017-08-05 00:06:33 · 501 阅读 · 0 评论 -
多校4 HDU-6077 Time To Get Up 模拟水题
原题链接:HDU-6077 大意:模拟即可。 思路:统计 7 个点。 打了23分钟.. 代码实现:#include <bits/stdc++.h>using namespace std;typedef long long ll;#define mem(s,t) memset(s,t,sizeof(s))#define D(v) cout<<#v<<" "<<v<<endl#defi原创 2017-08-07 13:36:12 · 436 阅读 · 0 评论 -
多校5 HDU-6095 Rikka with Competition
水题 原题链接: HDU-6095大意: 摔跤比赛,n 个人的能力为 aia_i,随机两两举办 n-1 场淘汰赛,当 abs(ai−aj)>Kabs(a_i-a_j) > K 时,大的那个人获胜,输的人淘汰,否则两个人都有机会获胜(即不产生输赢)。现在问结果有多少种可能性。思路:一开始被英文题绕死。 考虑最优情况。 代码实现:#include <bits/stdc++.h>using原创 2017-08-09 16:01:35 · 380 阅读 · 0 评论 -
#420 Div.2 A. Okabe and Future Gadget Laboratory——暴力
题目链接:http://codeforces.com/contest/821/problem/AAB题都是暴力 暴力水题,甚至觉得 B 比 A 简单 题意:如果这个矩阵里每个不是 1 的数都可以表示为纵向方向上的一个数和横向方向上的一个数之和 则输出 Yes 否则 No#include <bits/stdc++.h>using namespace std;typedef long long原创 2017-06-27 14:42:21 · 349 阅读 · 0 评论 -
Round 2 B - Little Pigs and Wolves CodeForces - 116B -水
题目链接: http://codeforces.com/problemset/problem/225/B大意: 地图上分布有小猪和狼,狼只能吃相邻的小猪且只能吃一个,求最多有多少小猪被吃。思路: 遍历一遍就行,题目是很水的。。。但是自己图论太差,题目做太少看见图论专题都被吓死。#include<bits/stdc++.h>#define mem(s,t) memset(s,t,sizeof(原创 2017-07-14 09:28:38 · 437 阅读 · 0 评论 -
Round 1 A-"Or" Game CodeForces - 578B-思路-或
题目链接: https://vjudge.net/contest/168327#problem/ADescription You are given n numbers a1, a2, …, an. You can perform at most k operations. For each operation you can multiply one of the numbers by x.原创 2017-07-13 11:58:26 · 323 阅读 · 0 评论 -
17年浙江省省赛C-What Kind of Friends Are You?
这道算是一道比较麻烦的水题。麻烦是针对我来说的,因为涉及到 map 的操作和长长的题干。 本来想节选一下,但是英文的概括能力太差= =大意:多组数据。 Kaban 有 n 个朋友,现在给出 c 个名字,他们中有 n 个是 Kaban 的朋友。Kaban 问 q 个问题来确定她的朋友。 回答 yes(1)的是她的朋友,回答no(0)的不是。每个问题得到的回应和每个真正的朋友的回答情原创 2017-04-22 21:16:23 · 1052 阅读 · 0 评论 -
BF Calculator CodeForces - 784G
Description In this problem you will write a simple generator of Brainfuck ( https://en.wikipedia.org/wiki/Brainfuck) calculators.You are given an arithmetic expression consisting of integers from 0原创 2017-05-26 17:31:39 · 475 阅读 · 0 评论 -
#416 Div.2 A. Vladik and Courtesy-water
A. Vladik and Courtesy time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output At regular competition Vladik and Valera won a and b candies respec原创 2017-05-28 00:08:31 · 503 阅读 · 0 评论 -
#416 Div.2 B. Vladik and Complicated Book - 排序&技巧
B. Vladik and Complicated Book time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Description Vladik had started reading a complicated book原创 2017-05-28 00:19:08 · 1083 阅读 · 0 评论 -
#411 Div.2 D. Minimum number of steps
We have a string of letters ‘a’ and ‘b’. We want to perform some operations on it. On each step we choose one of substrings “ab” in the string and replace it with the string “bba”. If we have no “ab” a原创 2017-05-05 01:56:42 · 748 阅读 · 0 评论 -
17-JSCPC&&CCPC中南赛区 D-Super Resolution-字符串签到
题目链接:http://202.197.224.59/OnlineJudge2/index.php/Problem/read/id/1263 //湘潭CCPC同一套题 竟然没找到JSCPC的地址 实现图形的放大 直接输出Description Bobo has an n×m picture consists of black and white pixels. He loves the pi原创 2017-05-20 11:21:08 · 787 阅读 · 0 评论 -
#420 Div.2 B. Okabe and Banana Trees——数学&暴力
题目链接: http://codeforces.com/contest/821/problem/B题目大意: 给一个 特定形式的函数表达式 在内部做一个矩形(如图的矩形 分别平行xy轴)求矩形的价值最大,价值指每个整数点的横纵坐标和即 x+y分析: 本来想当然肯定是中间最大,后来发现看时间根本不用想, y 从 0 到 b 遍历一遍就好了 计算公式是:(x+1)x2(y+1)+(y+1)y2(原创 2017-06-27 14:50:47 · 512 阅读 · 0 评论 -
圆有点挤
圆有点挤 ACdream - 1098 Time Limit: 1000MS Memory Limit: 64000KB 64bit IO Format: %lld & %lluDescription gg最近想给女友送两个精美的小礼品:两个底面半径分别为R1和R2的圆柱形宝石,并想装在一个盒子里送给女友。好不容易找到了一个长方体的盒子,其底面为A*B的矩形,他感觉好像宝原创 2016-11-26 15:20:02 · 435 阅读 · 0 评论 -
CodeForces - 581B - Luxurious Houses 逆序处理&水
题目链接: http://codeforces.com/problemset/problem/581/B B - Luxurious Houses CodeForces - 581B五月份竟然要过去了,回想起来也没做什么事情,前半个月忙于省赛,后面半个月,想起来只有两件事,自己的生日和整个小组连着通宵 3 天赶创新实践结题。生日那天,原本计划了很多,但是最近越来越没心情,干脆就叫了几个朋友撸串。原创 2017-05-31 22:03:49 · 665 阅读 · 0 评论 -
水题贪心今年暑假不AC HDU - 2037
活动规划题 最近一直在复习期末考,几乎没做题。就去刷了个水的可能安心点吧。 https://vjudge.net/problem/HDU-2037 输入活动的开始和结束时间,求最佳的安排能有几个活动。#include <bits/stdc++.h>using namespace std;typedef long long ll;#define mem(s,t) memset(s,t,si原创 2017-06-13 16:06:15 · 362 阅读 · 0 评论 -
一道有趣的伪博弈题——三叉树
题目链接: http://swjtuoj.cn/contest/13/problem/151/描述 在图论中,一个满三叉树的定义是这样的:”除最后一层无任何子节点外,每一层上的所有结点都有三个子结点”的三叉树。现在,在MGM和ELL面前就有这么一棵满三叉树。她们要用这棵树来进行博弈,一决胜负。MGM和ELL轮流进行操作。操作是这样的:“取走一个节点,及以此节点为根的子树(如果有的话)”。MGM先原创 2017-06-13 15:29:20 · 1308 阅读 · 4 评论 -
codeforces Div.2 899B Months and Years
大意: 判断一个连续的月份数组是否正确思路: 没被hack,挂了(惨) 没有考虑完全,需要的数组应该包括 平年 平年 平年 闰年 平年 平年 平年 暴力查询匹配即可。原创 2017-12-19 12:47:53 · 301 阅读 · 0 评论