kotori和bangdream】的更多相关文章

  #include<cstdio> #include<iostream> using namespace std; int n,x,a,b; int main() { cin>>n>>x>>a>>b; +b*(-x)*); printf("%.2lf",ans); ; }…
2020牛客寒假算法基础集训营1 这套题整体来说还是很简单的. A.honoka和格点三角形 这个题目不是很难,不过要考虑周全,面积是1,那么底边的长度可以是1也可以是2, 注意底边1和2会有重复的,所以要注意去除这个重复部分的. #include<bits/stdc++.h> using namespace std; ; typedef long long ll; ; int main(){ ll n,m,ans=; scanf("%lld%lld",&n,&am…
NC50038 kotori和糖果 题目 题目描述 kotori共有 \(n\) 块糖果,每块糖果的初始状态是分散的,她想把这些糖果聚在一堆.但她每次只能把两堆糖果合并成一堆. 已知把两堆数量为 \(a\) 和 \(b\) 的糖果聚在一堆的代价是 \(|a-b|\) . kotori想知道,她把这 \(n\) 块糖果聚在一堆的最小代价是多少? 输入描述 第一行是一个正整数 \(T\) ,代表数据组数. 第二行到第 \(T+1\) 行,每行一个非负整数 \(n\) ,代表kotori的糖果总数量.…
题目大意:ことり有$n$个设备,每个设备每秒共减少$a_i$能量(也就是说每一瞬间都在减少,而不是在一个时刻突然减少),开始前有$b_i$能量,ことり还有一个充电宝,无限能量,每秒共可以提供$p$的能量(也是每一瞬间都在提供),求ことり 最多可以用多久 题解:二分答案,比较这段时间中充电宝可以提供的电量和消耗的电量即可 卡点:1.$inf$设成$10^8$太小 2~5.$eps$设成$10^{-7}$太小导致$RE$ C++ Code: #include <cstdio> #define ma…
作为一个白嫖咸鱼,我每个活动都只打出三星卡就不玩了,于是写了一个模拟器,算算还要打几把hhh #include <iostream> #include <algorithm> using namespace std; const int goal = 77000; struct cnt { int ap; int score; int pt; int time; }; int main() { int score = 21385; int pt = 463; cnt a, b, c…
Day1 J题-u's的影响力 有一天,kotori发现了一个和lovelive相似的游戏:bangdream.令她惊讶的是,这个游戏和lovelive居然是同一个公司出的! kotori经过一段时间的练习后已经变得非常触,每个音符 x% 的概率perfect,获得 分, (100−x)% 概率great,获得 分. 已知一首歌有 个音符.kotori想知道,不考虑连击加成的话,一首歌得分的期望是多少? 题解如下 #include<iostream> using namespace std;…
GirlCat Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Problem Description As a cute girl, Kotori likes playing ``Hide and Seek'' with cats particularly.Under the influence of Kotori, many girls and cats are playing `…
Problem Description As a cute girl, Kotori likes playing ``Hide and Seek'' with cats particularly.Under the influence of Kotori, many girls and cats are playing ``Hide and Seek'' together.Koroti shots a photo. The size of this photo is n×m , each pix…
problemCode=3886">ZOJ 3886 题意: 定义一种NicoNico数x,x有下面特征: 全部不大于x且与x互质的数成等差数列,如x = 5 ,与5互素且不大于5的数1,2,3,4成等差数列.则5是一个NicoNico数. 再定义三种操作: 1.南小鸟询问[L, R]内有多少个NicoNico数: 2.果皇把[L, R]内的数全部对v取余: 3.果皇将第K个数换成X. 然后给你一个数列,并对这个数列运行若干操作 思路: 这样的问题果断要用LoveLive树线段树来做! 首…
题目链接:https://www.luogu.org/problemnew/show/P3946 交好几遍是因为虽然能过一直有提醒..强迫症qwq #include <bits/stdc++.h> #define ll long long using namespace std; const int maxn = 5 * 1e6 + 10; ll n, m, s, t, g, q; ll dis[maxn], h[maxn], l[maxn]; bool vis[maxn]; struct e…