CodeForces 484B Maximum Value
意甲冠军: a序列n(2*10^5)数字 问道a[i]>=a[j]如果是 a[i]%a[j]最大值是多少 思路: 感觉是一道挺乱来的题…… 我们能够将ans表示为a[i]-k*a[j] 这样我们枚举k仅仅要知道比k*a[j]大可是不到(k+1)*a[j]的值就好了 考虑到a[i]仅仅要10^
时间:2023-09-15  |  阅读:10
codeforces  758 A
n 个数 找到最大的 codeforces中文官网?使得每个数都和最大的相等 花费求和 #include<stdio.h> #include<algorithm> #include<string.h> #include<math.h> #include<set> #include<string>using namespace std; typedef long long LL;#
时间:2023-09-11  |  阅读:30
CodeForces 468 CHack it!
这是一道数学题 可惜我太菜了 只有看了题解才会做 #include <cstdio> #include <cstring> #include <iostream> #include <algorithm> using namespace std; const long long inf=1e18; inline long long read(){long long x=0,f=1,ch
时间:2023-09-11  |  阅读:26
Codeforces686C【dfs】
题意: n,m<=1e9 设定一天n小时,一小时m分钟, 显示时间的是一个7进制的表, 问你在一天里出现多少个时刻,表中的数字要都不相同。 思路: 因为7进制,显示的数字肯定是0-7之间的。 然后就是搜一下,注意显示的方式,所以m分钟有几
时间:2023-09-10  |  阅读:12
codeforces-1201 C Maximum Median
二分查找的典型应用,寻找虚无的值代入测试 1 #include <bits/stdc++.h> 2 #define _for(i,a,b) for(int i = (a);i < b;i ++) 3 typedef long long ll; 4 using namespace std; 5 inline ll read() 6 { 7 ll ans = 0; 8 char ch 
时间:2023-09-10  |  阅读:12
Codeforces Global Round 1
Codeforces Global Round 1 题解:The Editorial of the First Codeforces Global Round code1083,A:其实mod 2计算一下就行了 B:删掉最长的k-1段,sort C: Code Blocks?x是a的二进制最高位, 考虑对于a!=2^(x+1)-1,
时间:2023-09-08  |  阅读:15
codeforce 804B Minimum number of steps
cf劲啊 原题: 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&
时间:2023-09-05  |  阅读:270

本站为非赢利网站,部分文章来源或改编自互联网及其他公众平台,主要目的在于分享信息,版权归原作者所有,内容仅供读者参考,如有侵权请联系我们删除!

Copyright © 2022 匯編語言學習筆記 Inc. 保留所有权利。

底部版权信息