div

TheForces Round #24 (DIV3-Forces)11.1

TheForces Round #24 (DIV3-Forces) A - Banis and Cards 思路:不大于n的m的倍数的和 #include<bits/stdc++.h> using namespace std; #define int long long //#define int ......
DIV3-Forces TheForces Forces Round 11.1

Codeforces Round 906 (Div. 2)

Codeforces Round 906 (Div. 2) 比赛链接 A. Doremy's Paint 3 题目链接 判断给定的数组是不是满足a1+a2=a2+a3=a3+a4=......=an-1+an A思路: 这个题一开始没有读仔细问题,导致一时间出错了,后来读清楚问题之后发现其实这个数组 ......
Codeforces Round 906 Div

Codeforces Round 907 (Div. 2) B. Deja Vu(二分+后缀和+位运算)

Codeforces Round 907 (Div. 2) B. Deja Vu 思路: 预处理31位的 \(2^x\) 存在\(tmp_i\) 对于输入\(a_i\),通过查找最后一个二进制1位置,存在\(x0_i\) 由题意可知,对于输入的\(x\),如果有\(a_i\)可整除\(x\),则会使 ......
后缀 Codeforces Round Deja 907

Codeforces Round 907 (Div. 2)

Codeforces Round 907 (Div. 2) A. Sorting with Twos 题意: 给一个长度为n的数组,可以做任意次以下操作:选择一个整数m,将1-2m 的数减1。若能使数组变为一个单调递增的数组则输出YES,否则输出NO 分析: 只需要保证2m+1 -2m+1单调递增即 ......
Codeforces Round 907 Div

Codeforces Round 906 (Div. 2)

Codeforces Round 906 (Div. 2) A. Doremy's Paint 3 解题思路: \(a_1 + a_2 = a_2 + a_3\),所以\(a_1 = a_3\)。以此类推。所以整个序列最多出现两种不同的数字。 \(n = 2\)时,必然存在。 \(n = 3\)时, ......
Codeforces Round 906 Div

Educational Codeforces Round 129 (Rated for Div. 2)

Educational Codeforces Round 129 (Rated for Div. 2) B可以看作一个无限长的序列由a进行重复拼接,我们直接计算一下是哪个即可。 C判断无解之后直接模拟即可 D IDA*就行每次从大到小搜,实际非常快。 #include<cstdio> #includ ......
Educational Codeforces Round Rated 129

Codeforces Round 906 Div. 1 (CF1889)

貌似现在发周六的 CF 题解已经失去了时效性,不过问题不大。 A. Qingshan Loves Strings 2 Description 定义一个长度为 \(k\) 的 \(01\) 串 \(s\) 是好的,当且仅当 \(\forall i\in [1,k],s_i\neq s_{k-i+1}\ ......
Codeforces Round 1889 906 Div

Codeforces Round 907 (Div. 2)

Codeforces Round 907 (Div. 2) B题注意到每次都会至少下降1,所以不会超过30次,直接O(30n)即可 C题感觉可能比D和F还要思维一些。 肯定是尽量多积累combo一些然后一次清空,那么我们能清空的最大值就是当前的最大值,所以每次用小的来累计combo,然后消除当前的最 ......
Codeforces Round 907 Div

Codeforces Round 906 (Div. 2)A-E1

A. Doremy's Paint 3 记数组中数的种类数为\(k\),当\(k=1\)时,答案为\(yes\);当\(k=2\)时,记两个种类的数的个数差为\(d\),当\(d≤1\)时,答案为\(yes\);其他情况答案为\(no\)。 时间复杂度:\(O(nlogn)\) 1 void sol ......
Codeforces Round 906 A-E Div

具有contenteditable属性的可编辑div模拟input的placeholder

<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> .editabl ......
contenteditable placeholder 属性 input div

视频直播app源码,CSS div水平垂直居中和div置于底部

视频直播app源码,CSS div水平垂直居中和div置于底部 一、水平居中 .hor_center { margin: 0 auto;} ​ 二、水平垂直居中 .content { width: 360px; height: 240px;} .ver_hor_center { position: ......
视频直播 底部 div 源码 水平

Codeforces Round 906 (Div. 2) A-E1

比赛地址 A. Doremy's Paint 3 题意:给出一个数组\(b\),问能否通过重新排序使得数组满足\(b_1+b_2=b_2+b_3=...=b_{n-1}+b_{n}\) Solution 首先判断元素个数 如果是1,则满足条件 如果是2,需判断不同元素个数的差是否小于等于1 其余的均 ......
Codeforces Round 906 A-E Div

Codeforces Round 904 (Div. 2) C. Medium Design(前缀和+差分)

Codeforces Round 904 (Div. 2) C. Medium Design 思路: 因为出现的线段应该为不相同的线段,所以最小值应该为 \(1\) 或 \(m\) 因此我们可以通过差分储存线段范围内的加值,再用前缀和表示这个范围内的最大加值 sl为不包含\(1\)的线段的差分,sr ......
前缀 Codeforces Design Medium Round

js聚焦并将光标定位到输入框和可编辑DIV的最后

// 聚焦并将光标定位的文本末尾 div // let dom = $('.demonstrate-li-input').eq(i).focus() // let range = document.createRange() //创建一个新的范围对象 // let sel = window.getS ......
光标 DIV

Pinely Round 2 (Div. 1 + Div. 2) (CF1863)

本来开了某场远古 Div 1,然后学了一堆前置知识至今仍然不会 E。换一场写来得及吗? A. Channel 模拟,略。 B. Split Sort Description 给你一个长度为 \(n\) 的排列。 每次操作你可以选择一个数 \(x\),然后类似于快速排序地把小于 \(x\) 和大于等于 ......
Div Pinely Round 1863 CF

Codeforces Round 904 (Div. 2)

A. 没想到是暴力,做的很晚 B. 手玩一下即可 C. Medium Design 给定一个长为 \(n\) 的数组 \(a\) ,和若干条线段 \([l_i,r_i]\) ,你可以选择这其中的任何若干条线段,并让 \(a_l\sim a_r\) 均 \(+1\).请你计算可以得到的 \(\max( ......
Codeforces Round 904 Div

「题解」Codeforces Round 905 (Div. 3)

before 终于有一篇题解是一次性更所有题的了。 A. Morning Problem A. Morning Sol&Code 根据题意模拟即可。 #include <bits/stdc++.h> typedef long long ll; int min(int a, int b) { retu ......
题解 Codeforces Round 905 Div

Codeforces Round 905 div2 F题

记答案为\(ans_i\),表示从1到i次修改出现的字典序最小的数组a, \(c\)数组表示\(ans_i\)出现之后,所有修改的累加和。用一个vector存一下\(ans_i\)之后的所有修改。从1到q遍历每一次修改时,对\(c\)数组进行区间赋值操作,如果\(c\)数组中第一个不为0的数<0,那 ......
Codeforces Round div2 905 div

「解题报告」Codeforces Round 653 (Div. 3)

A. Required Remainder You are given three integers \(x, y\) and \(n\). Your task is to find the maximum integer \(k\) such that \(0 \le k \le n\) that ......
Codeforces 报告 Round 653 Div

Codeforces Round 905 (Div. 2)

Preface 周日晚上Div1,2,3同乐,但我不想打Div1,同时第三个号由于只打了两场没够到Div2的门槛,因此刚好打不了Div2,遂玩了一晚上LOL 今天补了下这场题感觉难度偏低,E之前的题都比较签,F刚开始没想到转化成差分最小准备去写扫描线+线段树了,后面发现其实可以写的很简单 A. Ch ......
Codeforces Round 905 Div

Codeforces Round 886 (Div. 4) 题解

link 我为什么还要 vp div4 场。。。 A 直接找最大的两个判断一下。 void solve() { int a[3]; cin >> a[0] >> a[1] >> a[2]; sort(a, a + 3); if(a[2] + a[1] >= 10) cout << "YES\n"; ......
题解 Codeforces Round 886 Div

Codeforces Round 905 (Div. 3)

Codeforces Round 905 (Div. 3) A. Morning 解题思路: 首先\(4\)个数字都要打印出来,所以\(ans\)起始值为\(4\)。 接着就是从左向右移动绝不回头,鼠标移动的距离和就是两两数字之差。 注意:这里\(0\)位置其实是\(10\). 代码: #inclu ......
Codeforces Round 905 Div

Codeforces Round 905 (Div. 2) D1. Dances (Easy version)(贪心+二分)

Codeforces Round 905 (Div. 2) D1. Dances (Easy version) 思路: 对于 \(a\),它的头默认为 \(1\),则 \(a_0\) = \(1\) 对于排完序的 \(a\) 与 \(b\) 数组 最优为从 \(a\) 的结尾删除,从 \(b\) 的 ......
Codeforces version Dances Round Easy

「解题报告」Codeforces Round 905 (Div. 3)

A. Morning You are given a four-digit pin code consisting of digits from \(0\) to \(9\) that needs to be entered. Initially, the cursor points to the ......
Codeforces 报告 Round 905 Div

Codeforces Round 905 (Div. 2) C. You Are So Beautiful(数据结构)

Codeforces Round 905 (Div. 2) C. You Are So Beautiful 定义: 设数组 abcd 子数组定义:从原数组砍去前面若干元素,后边若干元素,剩余的数组。如:bc、ab 子序列定义:从原数组删除若干元素,剩余元素拼凑一起,组成的数组。如:ac、bd 思路: ......

Codeforces Round 905 (Div. 3)

E. Look Back 因为每次都是2,可以推出x<=y2^(n),转化成 x/y<=2^(n),求n直接取对数即可 注意: 1.答案很大要开LL 2.不要直接乘,会爆LL,直接利用原式即可,如果后面的大,就减去大多少的对数 3.记得向上取整 点击查看代码 #include<bits/stdc++ ......
Codeforces Round 905 Div

Codeforces Round 905 (Div. 2)

目录写在前面ABCD1/D2E写在最后 写在前面 比赛地址:https://codeforces.com/contest/1884 oonp 这场 div2 怎么才 2k5 人打啊我草 里面还不知道多少大神的小号,呃呃 打了 1k3 掉了 75 分也是牛逼 A 考虑如何拼出一个长度为 \(n-k\) ......
Codeforces Round 905 Div

Codeforces Round 905 - div.3(A B C D E)

目录Codeforces Round 905 (Div. 3)A. MorningB. Chemistry Codeforces Round 905 (Div. 3) A. Morning 模拟光标移动即可 void solve(){ string ss; cin >> ss; char ch = ......
Codeforces Round 905 div

Codeforces Round 904 (Div. 2)

目录写在前面ABCD写在最后 写在前面 比赛地址:https://codeforces.com/contest/1884 捏吗我不会容斥,我是飞舞。 A \(k\le 10\),于是直接枚举 \(x\sim x+20\) 检查即可。 // /* By:Luckyblock */ #include < ......
Codeforces Round 904 Div

Codeforces Round 905 Div 1 (CF1887)

A1. Dances (Easy version) 把 \(a,b\) 序列都从小到大排序,\(a\) 贪心删大的,\(b\) 贪心删小的,二分答案并 \(O(n)\) \(\text{check}\)。 Code ```cpp const int N=1e5+5; int T,n,m; int a ......
Codeforces Round 1887 905 Div
共1208篇  :10/41页 首页上一页10下一页尾页