round math

Codeforces Round 787 (Div. 3)D. Vertical Paths

题目链接 题意:给定一棵树,将这棵树划分成几天互不相交的链,要求最小化链的数量 思路:每个叶子节点一定在一条链中,所以链的数量就是叶子节点的数量,从叶子节点往上跳直到根节点,边跳边标记,路径上所有点都属于这条链。 坑: 数据大时,不要轻易使用memset不然会t到起飞 vector不要开太多就比如不 ......
Codeforces Vertical Round Paths 787

Codeforces Round 814 (Div. 2)

基本情况 又是过了ABC。 A、B思路更多的是从数据上分析出来的,过的很顺。 C经典拿评测机来调试,甚至还RE了一次,最后终于过了。 C. Fighting Tournament Problem - C - Codeforces 第一次改错 这题我的思路是找到规律后,优先队列加二分查找。 但是一直W ......
Codeforces Round 814 Div

Codeforces Round 813 (Div. 2)

基本情况 疑似开窍了,, 又一次赛时做出ABC,而且只用了一小时,虽然后面的题目还是没做出来。 毕竟该做的题目都做出来了,没啥好按题分析的,总体总结一下吧。 赛后总结 自己造数据,不要急着交!可以大大减少+n的概率 多从数据中找思路,或者代码具体想想怎么实现,尽量别光傻看着题目。 ......
Codeforces Round 813 Div

Codeforces Round 812 (Div. 2)

基本情况 第一次赛时做出div2的ABC。 然而B题是秒的最快的? A题卡了一段时间经典+4,C题代码实现卡了一段时间。 A. Traveling Salesman Problem Problem - A - Codeforces 卡题分析 主要原因在少了特判,没有自己多构造几个特殊情况数据。 这是 ......
Codeforces Round 812 Div

Codeforces Round 810 (Div. 2)

基本情况 A题秒了,B、C题死活看不懂题目。 B. Party Problem - B - Codeforces 错误分析 为啥看不懂题目,一方面是英语水平确实不够,另一方面就是图的意识不行,如果能看出来这题隐含的建图思想,就很有助于理解题目。 正确思路 题意 有 \(T\) 组数据,每组数据给你一 ......
Codeforces Round 810 Div

Codeforces Round 809 (Div. 2)

基本情况 A题秒了。 B题卡了很久,最后过了。 C来不及了。 B. Making Towers Problem - B - Codeforces 卡题分析 最初想法 其实已经推出来下标差为奇数才能构成高塔了。 但是思维固化,认为这个问题就必须用LIS那类做法做,然后硬打了一个 \(\operator ......
Codeforces Round 809 Div

Codeforces Round 808 (Div. 2)

基本情况 最难受的一集。 A搞了一个半小时愣是没开出来。 A. Difference Operations Problem - A - Codeforces 错误分析 我分了好多类讨论,换言之没找到更本质的东西。 我想的是如果前面有一个数能处理到 \(1\) 那后面就都能过。 止步于此,而没有往更本 ......
Codeforces Round 808 Div

Codeforces Round 807 (Div. 2)

基本情况 AB题秒了。 C题搞了半天,搞了一个假的解法,最后还是爆空间了。 D题没想下去。 C. Mark and His Unfinished Essay Problem - C - Codeforces 错误分析 写出来自己的错解之后没有进一步思考,而是觉得没希望直接做D去了,实则D也没可能半小 ......
Codeforces Round 807 Div

Codeforces Round 914 (Div. 2)

基本情况 A题+2,幸好后面突然悟了。 B题体现了读题以及一词多义的重要性。 C题不会。看了一下1700分的题目,暂时先放了。 A. The Third Three Number Problem Problem - A - Codeforces 推出了规律,\(n\) 为偶数的时候,无脑 \(a = ......
Codeforces Round 914 Div

Codeforces Round 914 (Div. 2)

Codeforces Round 914 (Div. 2) A - Forked! 解题思路: 枚举皇后和国王能被骑士吃到的位置,重合的点数就是答案。 代码: #include <bits/stdc++.h> using namespace std; using ll = long long; ty ......
Codeforces Round 914 Div

Codeforces Round 914 (Div. 2)

Codeforces Round 914 (Div. 2) A. Forked! #include <bits/stdc++.h> #define endl '\n' #define int long long using namespace std; void solve(){ int a,b; ......
Codeforces Round 914 Div

Codeforces Round 803 (Div. 2)

基本情况 A题秒了。 B题经典+2。(经典不开longlong) C题读错题,没得思路。 B. Rising Sand Problem - B - Codeforces 思路好想,分类讨论找规律就行。 这里还是要强调一下认真分析数据: Input The second line of each te ......
Codeforces Round 803 Div

Codeforces Round 802 (Div. 2)

基本情况 A题秒了。 B题经典+4。 C题没想法(大概想了半小时)。 B. Palindromic Numbers Problem - B - Codeforces 起步 首先很明显是高精。 然后要求加上的数字位数和给的位数相同。 答案不限制,只要回文就行。 第一思路就是口胡几个万能的回文答案。 给 ......
Codeforces Round 802 Div

20.Explain how the following reasoning fails to address the complexity of the issue involved, and rebut it. “Sanya is warm all year round and has beautiful beaches,

Round 1: Identifying the Failure in Reasoning Speaker 1 (Student A): Hello, everyone! Let's kick off our discussion by examining the reasoning: "Sanya ......
the complexity following and beautiful

Codeforces Round 914 (Div. 2)

基本情况 脑子最卡的一集。 A题读假题,卡了快一小时。 B题代码太复杂,出错不好修改,一直调。 虽然最后都出来了,但是没有剩下任何时间看后面题目了。 A. Forked! Problem - A - Codeforces 一开始不知道犯得什么病,觉得可以斜着走一格算作一步,然后情况就太多了,非常不好 ......
Codeforces Round 914 Div

Codeforces Round 914 (Div. 2)

C. Array Game 题意:给定一个n的数组以及k的操作数,每次可以选择下表为i,j(i<j)得到一个abs(a[i]-a[j])的数放在数组末尾,问你k次操作后,数组中最小的数是多少? 思路:首先k>=3 选相同的下表两次,一定结果是0,是最小。 k==1 遍历出下表两两相减的绝对值最小以及 ......
Codeforces Round 914 Div

Codeforces Round 904 (Div. 2)

[Codeforces Round 904 (Div. 2)](https://codeforces.com/contest/1894) A. Simple Design 暴力就行了 1e9跑不满的 #include <bits/stdc++.h> #define int long long #de ......
Codeforces Round 904 Div

Codeforces Round 801 (Div. 2)

基本情况 A就开始犯病,导致+2. B、C 都过样例了,但是都错。 B. Circle Game 赛时推出来奇数必输,也知道偶数不是必赢,但是思路不清楚。 这里我没意识到一个很关键的性质。 奇数堆拿的石堆会变,这也导致了必输,比如三个堆 \(1,2,3\)。表粗的为JOE。 1 2 3 1 2 3 ......
Codeforces Round 801 Div

Codeforces Round 909 (Div. 3)

https://codeforces.com/contest/1899 一个小游戏 #include<iostream> #include<cstdio> #include<cstring> #include<algorithm> using namespace std; int n; int ma ......
Codeforces Round 909 Div

Codeforces Round 811 (Div. 3)

基本情况 ABC秒了。 DE都给了我希望,但都做不下去。 两道题反复横跳,结果最后谁也没做出来。 E还是比D亲切的,先补E吧。 E. Add Modulo 10 做的时候想着说对每个个位数的变化找找规律,但是没有进一步的发现。 实际上就应该从这里下手。 首先共识:相同的两个数经过操作后必然相同。 分 ......
Codeforces Round 811 Div

Codeforces Round 913 (Div. 3)

A. Rook 打印出象棋车的下一步 using namespace std; void solve(){ string s; cin>>s; char a=s[0]; char b=s[1]; set<string>ans; for(char i='1';i<='8';i++){ string t ......
Codeforces Round 913 Div

Codeforces Pinely Round 2 (D~G)

D - Two-Colored Dominoes by yzt E - Speedrun 题意 给定 \(n,m,k\) 。你需要考虑一个序列 \(t\)。 \(n\) 个要求:\(t_i \equiv h_i\mod k\)。 \(m\) 个要求:\(t_{u_i} \le t_{v_i}\)。 ......
Codeforces Pinely Round

Codeforces Round 894 G

玩一下样例就能知道 这个是和 每个seg的最大间隔相关 为了好写我们可以直接写成元素间隔 这样我们用两个multiset维护元素间隔以及元素即可 注意删除的时候我们只删一个值 需要删指针 还有考虑长度为1的情况 multiset<int>st,st1; void Erase(int x){ auto ......
Codeforces Round 894

Codeforces Round 913 (Div. 3)

Codeforces Round 913 (Div. 3) 比赛链接 ROOK 题目 思路: 我没有下过国际象棋,但这个题跟国际象棋真是没有一点关系,就是一个简单的输出 代码: #include<bits/stdc++.h> using namespace std; #define int long ......
Codeforces Round 913 Div

Codeforces Round 913 (Div. 3)

Codeforces Round 913 (Div. 3) div3 两题 新纪录.. 我再也不喝完酒打cf了 A. Rook #include <bits/stdc++.h> //#define int long long #define endl '\n' using namespace std ......
Codeforces Round 913 Div

Educational Codeforces Round 158 (Rated for Div. 2)

Preface 补题,妈的现在Edu E都做不来这搞毛啊 A. Line Trip 签到 #include<cstdio> #include<iostream> #include<utility> #include<vector> #include<cstring> #include<cmath> ......
Educational Codeforces Round Rated 158

Codeforces Round 913 (Div. 3)(A~F)

A. Rook 题意:在一个国际象棋棋盘中,横坐标为a-h,纵坐标为1-8,字母在前,数字在后,输入一个棋子的位置,输出该棋子所在的行与列中非棋子本身位置的所有位置。 分析:模拟。 代码: #include <iostream> #include <algorithm> using namespac ......
Codeforces Round 913 Div

Codeforces Round 908 C

111 发现要是所有的l r求和 L R 的差距>n 我们总可以找到一个x不在n个不同的aij里 然后我们知道L R 的差距不大于1e5 我们枚举这个最终的个数为now 我们钦定选满所有的非now的元素 看是否差一些元素达到now 当然维护过程中我们要注意l[i] r[i]的限制 但是我们枚举now ......
Codeforces Round 908

Codeforces Round 912 (Div. 2)

Preface 这场题莫名很对我胃口,因为F是个究极套路题,还是我最拿手的2-SAT,想+写不到半小时就搞定了 然后E的核心思想和上周末VP的一场省赛的题一样,因此看一眼就会了 唯一抽象的是D2要用对超集的sosdp,由于之前没写过就不知道还能这么搞 A. Halloumi Boxes 当\(k\g ......
Codeforces Round 912 Div

C#中的Math.Round()

C#中的Math.Round提供了非常多的重载方法,其中有两个重载方法是 public static double Round (double value, int digits, MidpointRounding mode); public static decimal Round (decima ......
Round Math
共1424篇  :4/48页 首页上一页4下一页尾页