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

    CodeForces 639 A

    Bear and Displayed Friends time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Limak is a little polar bear. He loves connecting with other bears via social networks. He has n friends and his

    64240发布于 2018-04-26
  • 来自专栏XINDOO的专栏

    codeforces 312

    代码: //codeforces 312 A //2013-05-01-19.12 #include <stdio.h> #include <string.h> char str[102]; int Archer //codeforces 312 B //2013-05-01-19.51 #include <stdio.h> const double inf = 0.00000000001; int

    30220发布于 2021-01-22
  • 来自专栏以终为始

    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(

    30910编辑于 2023-03-09
  • 来自专栏ACM算法日常

    CodeChef vs CodeForces

    刚学算法竞赛(CP)的人都会遇到两个刷题网站:Codechef和Codeforces。在任何CP爱好者中,你都会发现其中一半赞成Codechef,而另一半倡导CodeForces。 在Codechef上有一个6星级评级,在Codeforces上的评分为1932,许多朋友也加入到CP,我觉得我有经验概述两个平台的好处和缺点,如果你只是刚进入这个极具竞争力的世界。 CodeForces 一方面,CodeForces是一个致力于编程和编程竞赛的社交网络。另一方面,它是一个定期举行竞赛的平台,参赛者的技能通过他们的评分来体现,并且可以利用以前的比赛进行准备。 ? 比赛分为Div1,Div2和Div3,你可以根据你的CodeForces评分参与其中。每场比赛的持续时间为2-2.5小时,通常有5-6个问题。 然后,你可以主要参与CodeForces,偶尔访问Codechef。 如果你在读第3年或第4年,或者你想要准备面试,那么直接从CodeForces开始。

    2.5K10发布于 2021-07-19
  • 来自专栏我的C语言

    Codeforces之旅(2)

    对于这场比赛来说,我还是没有上 青。其实说来惭愧,在比赛开始前我也刷了不少的题目,但是呢,比完结束之后才知道,对于1200分数以下的题目来说,通常都不怎么涉及数据结构和一些难度比较大的题目。但是,这些都是我现在才知道的,如果你也是和我一样是一个灰名的话,你一定要多注意思考简单的方法去实现问题的解决,同时1200以下分数的题目有时候还会多包涵一些简单的模拟,这也是我们小灰明名需要注意的。 这场比下来很遗憾吧,对于Div3的C题,我真的哭死

    16810编辑于 2024-11-20
  • 来自专栏数据结构与算法

    codeforces1025

    首先考虑一个很显然的区间dp, $f[l][r][root]$表示$(l, r)$区间内,以$root$为根是否可行

    44910发布于 2018-09-17
  • 来自专栏CSDN旧文

    CodeForces - 1047A

    A. Little C Loves 3 I time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Little C loves number «3» very much. He loves all things about it.

    58040发布于 2020-10-28
  • 来自专栏我的C语言

    Codeforces之旅(2)---

    介绍 这是关于codeforces之旅(2)的补充的部分,补充最后一个D题目的讲解。

    15700编辑于 2024-11-24
  • 来自专栏全栈程序员必看

    Codeforces Helpful Maths

    Xenia the beginner mathematician is a third year student at elementary school. She is now learning the addition operation.

    87010编辑于 2022-07-05
  • 来自专栏算法修养

    CodeForces 651 A Joysticks

    A. Joysticks time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Friends are going to play console. They have two joysticks and only one charger for them. Initially first joystick is cha

    64330发布于 2018-04-26
  • 来自专栏wym

    Codeforces #567 ABC

    A. 个数就不说了,第二个值 有多余的凑起来能再买一个就把还需要钱少的输出否则为0

    1.1K20发布于 2019-07-08
  • 来自专栏wym

    Codeforces Round #559

    接下来n个数a1~an是男生送出的最小数量,然后是m个 b1~bm 是女生收到的最大数量。

    44020发布于 2019-06-14
  • CodeForces】554C - CodeForces 554C(组合数学)

    Kyoya Ootori has a bag with n colored balls that are colored with k different colors. The colors are labeled from 1 to k. Balls of the same color are indistinguishable. He draws balls from the bag one by one until the bag is empty. He noticed that he drew the last ball of color ibefore drawing the last ball of color i + 1 for all i from 1 to k - 1. Now he wonders how many different ways this can happen.

    40110编辑于 2025-08-26
  • 来自专栏饶文津的专栏

    CodeForces 489A】SwapSort

    In this problem your goal is to sort an array consisting of n integers in at most n swaps. For the given array find the sequence of swaps that makes the array sorted in the non-descending order. Swaps are performed consecutively, one after another.

    82910发布于 2020-05-31
  • 来自专栏奇妙的算法世界

    codeforces 573A (数论)

    Limak is an old brown bear. He often plays poker with his friends. Today they went to a casino. There are n players (including Limak himself) and right now all of them have bids on the table. i-th of them has bid with size a i dollars.

    36710发布于 2020-10-23
  • 来自专栏计算机视觉与深度学习基础

    Codeforces 459C

    构造题 最多可以是k的d次方的学生不成为朋友 循环节的长度以k为倍数翻倍 注意long long #include<iostream> #include<cstdio> #include<cstdlib> #include<string.h> #include<math.h> #include<algorithm> #include<vector> #include<queue> using namespace std; typedef long long ll; int main() { ll n

    571100发布于 2018-01-12
  • 来自专栏Script Boy (CN-SIMO)

    Codeforces Round #234A

    该文是关于Codeforces Round #234A的题目,介绍了该题的题意、解题思路以及代码实现。

    68900发布于 2017-12-26
  • 来自专栏CSDN旧文

    CodeForces - 262B

    Roma works in a company that sells TVs. Now he has to prepare a report for the last year.

    35420发布于 2020-10-28
  • 来自专栏奇妙的算法世界

    codeforces 1349A(数学)

    题意要求求出gcd(lcm(a_{i},a_{j})) | i<j,由于lcm(a_{i},a_{j})=a_{i}*a_{j}/gcd(a_{i},a_{j}),故得到式子gcd(a_{i}*a_{j}/gcd(a_{i},a_{j}))。接下来对式子进行化简。

    56100发布于 2020-10-15
  • 来自专栏计算机视觉与深度学习基础

    Codeforces 460C

    比较裸的二分,但是比赛的时候脑抽,用树状数组瞎搞过了,但是边界条件没注意让hack了。 后来看到有人写了很简单的版本,又过了一遍,提醒一下自己不能忘记基本算法。 #include<iostream> #include<cstdio> #include<cstdlib> #include<string.h> #include<math.h> #include<algorithm> #include<vector> #include<queue> using namespace std; typedef lon

    67970发布于 2018-01-12
领券