首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 来自专栏数据结构与算法

    Educational Codeforces Round 45 (Rated for Div. 2)

    第一次打cf,确实有很多不适应的地方,第一题上来把$n$和$m$看反了,然后特判的时候写的是$M % N$,直接wa到飞

    44840发布于 2019-01-30
  • 来自专栏ACM算法日常

    Educational Codeforces Round 98 (Rated for Div. 2)

    Educational Codeforces Round 98 (Rated for Div. 2) A.

    84720发布于 2020-11-26
  • 来自专栏ACM算法日常

    Educational Codeforces Round 99 (Rated for Div. 2)

    当先手发完球耐力值变成0的时候,后手选择回击球,因为此时先手无法反击。那么先手就少赢一轮,且后手每一轮都能赢。

    43740发布于 2020-12-15
  • 来自专栏ACM算法日常

    Educational Codeforces Round 100 (Rated for Div. 2)

    时刻,机器人处于静止,那么他会执行这条命令,否则会继续执行前一条命令。对于每一条命令

    65230发布于 2020-12-31
  • 来自专栏数据结构与算法

    Educational Codeforces Round 51 (Rated for Div. 2)

    $f[i][j][sta]$表示到第$i$列,有$j$个连通块的方案,当前列的状态为$sta$,就是“白白” “白黑”“黑白”“黑黑”这四种状态

    53820发布于 2018-09-21
  • 来自专栏ACM算法日常

    Educational Codeforces Round 81 (Rated for Div. 2)

    B. Infinite Prefixes 无限前缀 You are given string ? of length ? consisting of 0-s and 1-s. You build an

    47530发布于 2020-02-17
  • 来自专栏ypw

    Educational Codeforces Round 83 (Rated for Div. 2) A~~E

    A 水题 #include<bits/stdc++.h> using namespace std; int main(){ int t; cin>>t; while(t--){ int n,m; cin>>n>>m; if(n % m==0) cout<<"YES"<<endl; else cout<<"NO"<<endl; } } B 水题 #include<bits/stdc++.h> using namespace std; int a[105]; int main()

    42020发布于 2020-09-11
  • 来自专栏HAUE_LYS'Blog

    Educational Codeforces Round 137 (Rated for Div. 2)(A~E)

    D和E在补了,在补了。。。 ---- A. Password ---- Origional Link 题目大意: 给定 n 个 0\sim 9 之间不能使用的数字,保证剩余的数大于 2。 任意两个数子组合,每个数字可使用两次,组成一个四位密码。 求在剩余的可选数字中,能组成的密码数量。 ---- 思想: 签到题。 任意两个数字可组成的密码数量固定为 6。 则总数量为剩余数字中的两两组合的数量乘 6。 即设剩余的数的数量为 x = 10 - n,总密码数为 \frac{x\times (x - 1)}{2}.

    52720编辑于 2022-10-31
  • 来自专栏wym

    Educational Codeforces Round 44 (Rated for Div. 2) B. Switches and Lamps

    You are given n switches and m lamps. The i-th switch turns on some subset of the lamps. This information is given as the matrix aconsisting of n rows and m columns where ai, j = 1 if the i-th switch turns on the j-th lamp and ai, j = 0 if the i-th switch is not connected to the j-th lamp.

    71020发布于 2018-08-30
  • 来自专栏以终为始

    Vasya and Book ( Codeforces Educational Codeforces Round 55 )

    题意:当前在看书的第 x 页,每次可以向前或者向后翻 d 页,这个书一共 n 页,问能否用最小操作翻到第 y 页。 题解:三种情况:1、直接翻能到的一定最短。 2、先翻到第一页,然后往后翻,翻到第 y 页。3、先翻到第 n 页,然后往前翻,翻到第 y 页。 #include<bits/stdc++.h> using namespace std; typedef long long ll; int main() { int ans,t,n,x,y,d; cin >> t; while(

    34310编辑于 2023-03-09
  • 来自专栏数据结构与算法

    Educational Codeforces Round 42 (Rated for Div. 2)

    A. Equator(模拟) 找权值的中位数,直接模拟。。 代码写的好丑qwq。。 #include<cstdio> #include<cstring> #include<algorithm> #include<cmath> using namespace std; const int MAXN = 1e6 + 10; inline int read() { char c = getchar(); int x = 0, f = 1; while(c < '0' || c > '9') {if

    38420发布于 2018-08-01
  • 来自专栏ypw

    Educational Codeforces Round 82 (Rated for Div. 2)

    思路:我的思路是记录每个1出现的位置,然后在进行遍历得到每相邻的1之间的距离。然后都加起来输出就行了

    33910发布于 2020-09-11
  • 来自专栏小樱的经验随笔

    Educational Codeforces Round 21 D.Array Division(二分)

    D. Array Division time limit per test:2 seconds memory limit per test:256 megabytes input:standard input output:standard output Vasya has an array a consisting of positive integer numbers. Vasya wants to divide this array into two non-empty consecutive par

    1.1K110发布于 2018-04-09
  • 来自专栏HAUE_LYS'Blog

    Educational Codeforces Round 132 (Rated for Div. 2) A·B·C

    ---- A. Three Doors ---- 原题链接 Origional Link ---- 思想 从拿到钥匙的门开始,用其得到的钥匙遍历对应的门 直到钥匙为0,若共打开了3道门,则为YES ---- 代码 #include <bits/stdc++.h> using namespace std; const int N = 10; void solve(){ int a[N]; int n; cin >> n; int flag = 1; //记录打开的

    38630编辑于 2022-09-16
  • 来自专栏wym

    Educational Codeforces Round 65 (Rated for Div. 2) A-D

    rank是能够通知到的人的个数,比较当前这两个人谁能通知到的人较少,然后把能通知到的人较少的那个人的指向pre[a]指向b(假设a能通知到的人较少),这样是为了减少最后那个for循环的操作,因为你之前把一些不联通的几个子图连到了一起,然而每一个子图里的非根节点的pre还未改变,你需要最后再把它们的指向改一遍。你每次联通的时候都是把人较少的联通到人较多的,最后for循环里改变的次数较少。不过你不比较的话也一样,最后都会指向一个人。

    42010发布于 2019-06-14
  • 来自专栏ACM算法日常

    Educational Codeforces Round 95 (Rated for Div. 2) A-D

    首先规定一个木棍和一个木炭可以组合成一个火把,再给出两种操作,操作一是可以用一根木棍去换根木棍,操作二是可以用根木棍去换一个木炭,初始时有一根木棍,问最少进行多少次操作可以得到个火把(组成火把的过程不花费操作次数,换句话说,只要有至少个木棍和个木炭即可达成目标)。

    62820发布于 2020-09-18
  • 来自专栏HAUE_LYS'Blog

    Educational Codeforces Round 137 (Rated for Div. 2)(A~D)

    36120编辑于 2023-09-04
  • 来自专栏xiaohejun的算法知识分享

    Educational_Codeforces_Round_81(Rated_for_Div. 2)_D题

    求$gcd(a, m) = gcd(a+x, m), 0 <= x < m, 1 <= a < m <= 10^{10}$的$x$的个数

    38720发布于 2020-02-18
  • 来自专栏glm的全栈学习之路

    Educational Codeforces Round 81 (Rated for Div. 2) B - Infinite Prefixes

    You are given string s of length nn consisting of 0-s and 1-s. You build an infinite string t as a concatenation of an infinite number of strings s, or t=ssss…t=ssss… For example, if s= 10010, then t= 100101001010010...

    53830发布于 2020-09-28
  • 来自专栏glm的全栈学习之路

    Educational Codeforces Round 81 (Rated for Div. 2) A. Display The Number

    You have a large electronic screen which can display up to 998244353998244353 decimal digits. The digits are displayed in the same way as on different electronic alarm clocks: each place for a digit consists of 77 segments which can be turned on and off to compose different digits. The following picture describes how you can display all 1010 decimal digits:

    50730发布于 2020-09-28
领券