网站首页 站内搜索

搜索结果

查询Tags标签: 题解,共有 1043条记录
  • 题解 Merchant

    传送门 可以发现如果我们最终选择的物品集合已经确定,就很好求了 \(\sum k*t+\sum b \geqslant s\) ,二分即可 但现在我们无法确定该选哪些物品因此我们只需要check一下0时刻是否符合条件,如果不符合则进行二分。 注意check的时候我们只需要找出最大的 \(m\) 个即可有点…

    2021/8/10 6:35:36 人评论 次浏览
  • 题解 Merchant

    传送门 可以发现如果我们最终选择的物品集合已经确定,就很好求了 \(\sum k*t+\sum b \geqslant s\) ,二分即可 但现在我们无法确定该选哪些物品因此我们只需要check一下0时刻是否符合条件,如果不符合则进行二分。 注意check的时候我们只需要找出最大的 \(m\) 个即可有点…

    2021/8/10 6:35:36 人评论 次浏览
  • Sliding Window - 题解【单调队列】

    题面:An array of size n ≤ 106 is given to you. There is a sliding window of size k which is moving from the very left of the array to the very right. You can only see the k numbers in the window. Each time the sliding window moves rightwards by one …

    2021/8/10 6:07:14 人评论 次浏览
  • Sliding Window - 题解【单调队列】

    题面:An array of size n ≤ 106 is given to you. There is a sliding window of size k which is moving from the very left of the array to the very right. You can only see the k numbers in the window. Each time the sliding window moves rightwards by one …

    2021/8/10 6:07:14 人评论 次浏览
  • Persistent Bits - 题解【二进制】

    题面:WhatNext Software creates sequence generators that they hope will produce fairly random sequences of 16-bit unsigned integers in the range 0–65535. In general a sequence is specified by integers A, B, C, and S, where 1 ≤ A < 32768, 0 ≤ B &…

    2021/8/10 6:06:58 人评论 次浏览
  • Persistent Bits - 题解【二进制】

    题面:WhatNext Software creates sequence generators that they hope will produce fairly random sequences of 16-bit unsigned integers in the range 0–65535. In general a sequence is specified by integers A, B, C, and S, where 1 ≤ A < 32768, 0 ≤ B &…

    2021/8/10 6:06:58 人评论 次浏览
  • HDU6960. Necklace of Beads题解

    HDU6960. Necklace of Beads 题意: 有一串由红、绿、蓝三种颜色的珠子组成的项链,珠子数为\(n\)​​个。 问:在旋转后一样的情形只算一种的条件下,有多少种情况满足相同颜色不相邻且绿珠子不超过\(k\)个。 分析: 题目中对绿色的个数有限制,又有旋转同构的问题存在。 …

    2021/8/10 6:05:35 人评论 次浏览
  • HDU6960. Necklace of Beads题解

    HDU6960. Necklace of Beads 题意: 有一串由红、绿、蓝三种颜色的珠子组成的项链,珠子数为\(n\)​​个。 问:在旋转后一样的情形只算一种的条件下,有多少种情况满足相同颜色不相邻且绿珠子不超过\(k\)个。 分析: 题目中对绿色的个数有限制,又有旋转同构的问题存在。 …

    2021/8/10 6:05:35 人评论 次浏览
  • 【题解】HDOJ7036 [2021百度之星初赛三]数字游戏

    前往:我自己搭建的博客 题目 HDOJ7036 数字游戏 代码 #include <bits/stdc++.h> using namespace std; typedef long long ll;int main() {int T; scanf("%d",&T);while(T--){ll n,mx,mn,ave; scanf("%lld%lld%lld%lld",&n,&mx,&a…

    2021/8/8 6:08:46 人评论 次浏览
  • 【题解】HDOJ7036 [2021百度之星初赛三]数字游戏

    前往:我自己搭建的博客 题目 HDOJ7036 数字游戏 代码 #include <bits/stdc++.h> using namespace std; typedef long long ll;int main() {int T; scanf("%d",&T);while(T--){ll n,mx,mn,ave; scanf("%lld%lld%lld%lld",&n,&mx,&a…

    2021/8/8 6:08:46 人评论 次浏览
  • [Acwing Contest] 第 11 场周赛 题解

    大家好,我是 Sora。这场周赛非常简单,所以写了 A 之后就没打了。 个人感觉 CF 有 1500 分就可以 AK 了。A. 计算abc 题目描述 有三个正整数 \(a,b,c\),我们不知道每个数的具体值,但我们知道 \(a≤b≤c\)。 现在,以随机顺序给出 \(a+b,a+c,b+c,a+b+c\) 的值,请你求出…

    2021/8/7 23:09:51 人评论 次浏览
  • [Acwing Contest] 第 11 场周赛 题解

    大家好,我是 Sora。这场周赛非常简单,所以写了 A 之后就没打了。 个人感觉 CF 有 1500 分就可以 AK 了。A. 计算abc 题目描述 有三个正整数 \(a,b,c\),我们不知道每个数的具体值,但我们知道 \(a≤b≤c\)。 现在,以随机顺序给出 \(a+b,a+c,b+c,a+b+c\) 的值,请你求出…

    2021/8/7 23:09:51 人评论 次浏览
  • L1-020 帅到没朋友 (20 分)python题解

    L1-020 帅到没朋友 (20 分)当芸芸众生忙着在朋友圈中发照片的时候,总有一些人因为太帅而没有朋友。本题就要求你找出那些帅到没有朋友的人。输入格式:输入第一行给出一个正整数N(≤100),是已知朋友圈的个数;随后N行,每行首先给出一个正整数K(≤1000),为朋友圈中…

    2021/8/7 1:36:56 人评论 次浏览
  • L1-020 帅到没朋友 (20 分)python题解

    L1-020 帅到没朋友 (20 分)当芸芸众生忙着在朋友圈中发照片的时候,总有一些人因为太帅而没有朋友。本题就要求你找出那些帅到没有朋友的人。输入格式:输入第一行给出一个正整数N(≤100),是已知朋友圈的个数;随后N行,每行首先给出一个正整数K(≤1000),为朋友圈中…

    2021/8/7 1:36:56 人评论 次浏览
  • 【题解】HDOJ6999 [2021百度之星初赛一]萌新

    前往:我自己搭建的博客 题目 HDOJ6999 萌新 题解 设amodc=bmodc=m,则a=k1c+m,b=k2c+m,所以a−b=(k1−k2)c=kc。注意特判a=b的情况。 代码 #include <bits/stdc++.h> using namespace std; typedef long long ll; const int inf=1e9+5;int main() {int T; scanf(&…

    2021/8/5 23:05:58 人评论 次浏览
扫一扫关注最新编程教程