
acm题目
blue_cgt
这个作者很懒,什么都没留下…
展开
-
Building Shops (HDU - 6024 )
Problem DescriptionHDU’s n classrooms are on a line ,which can be considered as a number line. Each classroom has a coordinate. Now Little Q wants to build several candy shops in these n classrooms....原创 2018-04-21 09:45:09 · 189 阅读 · 0 评论 -
uestc 方差(乘,和线段树)
https://acm.uestc.edu.cn/problem/fang-chai/description聪明的做法#include <bits/stdc++.h>using namespace std;typedef long long ll;const int MAXN = 100005;const ll mod = 1e9+7;int n, m;st...原创 2019-05-22 17:59:25 · 225 阅读 · 0 评论 -
种海带
a b c 相邻b>a,b>c删除a,b,c添加a+c-b相当于删除a,c,改b权值priority_queue不支持以上删除操作打标记#include <bits/stdc++.h>#define val first#define id secondusing namespace std;typedef long long...原创 2019-05-20 23:23:20 · 228 阅读 · 0 评论 -
在线求区间众数和离线求区间众数(uestc的题 冬马和纱天下第一和 我永远喜欢冬马和纱)
两种做法都是要用到分块在线的题的地址是https://acm.uestc.edu.cn/problem/dong-ma-he-sha-tian-xia-di-yi/description题意简化就是求一个区间内的最大众数,本来是看了网上的在线区间众数求法(https://blog.youkuaiyun.com/BerryKanry/article/details/75478987?location...原创 2019-05-20 14:13:32 · 938 阅读 · 0 评论 -
Queries on a String
outputstandard outputA string s is given. Also there is a string p, and initially it is empty. You need to perform q operations of kind «add a letter to the end of the string p» and «remove a lett...原创 2018-03-30 01:56:28 · 625 阅读 · 0 评论 -
Restoring Number
Pavel had two positive integers a and b. He found their sum s and greatest common divisor g, and forgot a and b after that. Help him to restore the original numbers.InputA single line contains two...原创 2018-03-30 21:29:56 · 612 阅读 · 0 评论 -
Gym - 101755H
H. Safe Pathtime limit per test2.0 smemory limit per test256 MBinputstandard inputoutputstandard outputYou play a new RPG. The world map in it is represented by a grid of n × m ce...原创 2018-03-31 00:40:25 · 948 阅读 · 4 评论 -
华工校赛小马哥的超级盐水
题目描述小马哥有 nn 杯盐水,第 ii 杯有 a_{i}ai 单位的盐和 b_{i}bi 单位的水。小马哥很无聊,于是他想知道有多少种这 nn杯盐水的非空子集,倒在一起之后盐和水的比是 \displaystyle \frac{x}{y}yx. 输入格式 输入第一行包含一个整数T,代表数据组数。每组数据第一行包含三个整数n,x,y(2<=n<...转载 2018-04-10 01:17:27 · 211 阅读 · 0 评论 -
CF D. Merge Equals
time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given an array of positive integers. While there are at least two equal el...原创 2018-04-11 21:06:39 · 267 阅读 · 0 评论 -
沃老师学生的成绩
题目描述 第一次期中考终于结束啦!沃老师是个语文老师,他在评学生的作文成绩时,给每位学生的分数都是一个小于10的非负小数。Amy 8.999999999999999999999999999999999999999990000Bob 8.9999999999999999999999999999999999999999800Cat 8.999999999999999999999...原创 2018-04-14 09:32:46 · 317 阅读 · 0 评论 -
18广工校赛题目
A 跳台阶Description 有一个n级台阶的楼梯,小明一开始在第0个台阶,小明一次可以向上跳1步,两步...甚至是n步,请问小明跳到n级台阶有多少种跳法?Input 第一行输入一个整数t,代表有t组样例:( T<=30)接下来的t行,都用一个整数n,表示楼梯有n级台阶( 1<=n<=30)Output 输出跳到第n级台阶有多少...转载 2018-04-14 11:50:21 · 953 阅读 · 0 评论 -
Happy Necklace(hdu 6030)
Problem DescriptionLittle Q wants to buy a necklace for his girlfriend. Necklaces are single strings composed of multiple red and blue beads.Little Q desperately wants to impress his girlfriend, he...原创 2018-04-21 09:37:27 · 302 阅读 · 0 评论 -
UESTC 人在地上走,锅从天上来(线段区间维护和点更新)
https://acm.uestc.edu.cn/problem/ren-zai-di-shang-zou-guo-cong-tian-shang-lai/description将点当成左闭右开的线段,然后每次查是否有位置填,也就是一个点维护和一个线段维护就可以了#include <bits/stdc++.h>using namespace std;const in...原创 2019-05-22 18:06:53 · 248 阅读 · 0 评论