IT大道IT大道

首页 > TAG信息列表 > codeforces

  • Educational Codeforces Round 27 C

    Educational Codeforces Round 27 C

    题意:给出一些节目的播放区间,问有2个电视的你是否可以看完全部节目,不可重合
    思路:模拟

    1 #include<bits/stdc++.h>
    2 using namespace std;
    3
    4 struct node{
    5 in...

    2017-08-23 itdadao 技术 255 ℃ 0
  • Educational Codeforces Round 27   A

    Educational Codeforces Round 27 A

    题意:让你从2*n个数,选n个,问是否会和另外n个1V1比赛,每场都赢,只有大于才赢
    思路:标记下即可
    http://codeforces.com/contest/845/problem/A

    1 #include<bits/stdc++.h>
    2 usi...

    2017-08-23 itdadao 技术 261 ℃ 0
  • CodeForces 840B

    CodeForces 840B

    思路来自这里,重点大概是想到建树和无解情况,然后就变成树形DP了- -/*CodeForces 840B - Leha and another game about graph [ 增量构造,树上差分 ] | Codeforces Round #4...

    2017-08-20 itdadao 技术 81 ℃ 0
  • Codeforces Beta Round #13 E. Holes 分块

    Codeforces Beta Round #13 E. Holes 分块

    链接:http://codeforces.com/contest/13/problem/E题意:有n个洞,每个洞有一个power值,表示进入这个洞的球能够被弹到i+power处,两种操作 1.将a洞的power改为b 2.询问从洞a开始放...

    2017-08-19 itdadao 技术 61 ℃ 0
  • Codeforces 841A  841B题解

    Codeforces 841A 841B题解

    此文为博主原创题解,转载时请通知博主,并把原文链接放在正文醒目位置。A. Generous Kefa    B. Godsend两道水题...A - 题目大意:把n个字母分配给k个人,如果一个人得到了两...

    2017-08-19 itdadao 技术 279 ℃ 0
  • Codeforces Round #404 (Div. 2) E. Anton and Permutation 分块

    Codeforces Round #404 (Div. 2) E. Anton and Permutation 分块

    链接:http://codeforces.com/contest/785/problem/E题意:给你一个序列,初始值a[i]=i,每次操作交换a[l]和a[r],问有多少个逆序对题解:分块就可以了代码: 31 int n, q; 32 int a[MAXN...

    2017-08-19 itdadao 技术 66 ℃ 0
  • [Codeforces 816A]Karen and Morning

    [Codeforces 816A]Karen and Morning

    题目大意:给你一个时间(hh:mm),求最少经过多少分钟才能使这个时间变成回文。解题思路:模拟,先判断0的情况,然后每过1分钟判断一次即可。C++ Code:#include<cstdio>int main(){ int...

    2017-08-19 itdadao 技术 72 ℃ 0
  • C. Leha and Function

    C. Leha and Function

    C. Leha and Function

    time limit per test
    2 seconds

    memory limit per test
    256 megabytes

    input
    standard input

    output
    standard output


    Leha like all kinds of...

    2017-08-19 itdadao 技术 351 ℃ 0
  • B. Godsend

    B. Godsend

    B. Godsend

    time limit per test
    2 seconds

    memory limit per test
    256 megabytes

    input
    standard input

    output
    standard output


    Leha somehow found an array c...

    2017-08-19 itdadao 技术 284 ℃ 0
  • Codeforces Round #429 (Div. 2)    B. Godsend

    Codeforces Round #429 (Div. 2) B. Godsend

    B. Godsend

    time limit per test
    2 seconds

    memory limit per test
    256 megabytes

    input
    standard input

    output
    standard output


    Leha somehow found an array cons...

    2017-08-19 itdadao 技术 77 ℃ 0
  • B. Game of the Rows

    B. Game of the Rows

    B. Game of the Rowstime limit per test 1 secondmemory limit per test 256 megabytesinput standard inputoutput standard outputDaenerys Targaryen has an army consi...

    2017-08-19 itdadao 技术 52 ℃ 0
  • Codeforces Round #386 (Div. 2)  E

    Codeforces Round #386 (Div. 2) E

    题意:给你n个数,和m,让我们从1-m选数字,使得n个数奇数和偶数个数相同切各不相同
    思路:模拟

    1 #include<bits/stdc++.h>
    2 using namespace std;
    3 typedef long long ll;
    4...

    2017-08-18 itdadao 技术 42 ℃ 0
  • Codeforces Round #333 (Div. 1) B. Lipshitz Sequence 单调栈

    Codeforces Round #333 (Div. 1) B. Lipshitz Sequence 单调栈

    链接:http://codeforces.com/contest/601/problem/B题意:For an array , we define it's Lipschitz constant as follows:if n&thinsp;<&thinsp;2, if n&thinsp;&ge;&thinsp;...

    2017-08-18 itdadao 技术 41 ℃ 0
  • Codeforces 594A

    Codeforces 594A

    题目大意:给你在一条线上的n(偶数)个点,mike和alice 开始禁点,他们轮流开始,直到最后只剩下两个点,
    mike希望剩下的两个点距离尽可能小,alice希望剩下的两个点距离尽可能大,他们都采...

    2017-08-18 itdadao 技术 43 ℃ 0
  • Codeforces Round #373 (Div. 1) C. Sasha and Array 线段树

    Codeforces Round #373 (Div. 1) C. Sasha and Array 线段树

    链接:http://codeforces.com/contest/718/problem/C题意:维护一个长度为n的数列a,支持下面两个操作: 1 l r x — increase all integers on the segment from l to r by va...

    2017-08-18 itdadao 技术 43 ℃ 0
  • Codeforces Round #428 (Div. 2) D. Winter is here[数论II][容斥原理]

    Codeforces Round #428 (Div. 2) D. Winter is here[数论II][容斥原理]

    传送门:http://codeforces.com/contest/839/problem/D







    Examples


    input
    3
    3 3 1


    output
    12


    input
    4
    2 3 4 6


    output
    39




    Note
    In the first sample the cla...

    2017-08-17 itdadao 技术 42 ℃ 0
  • Codeforces Round #361 (Div. 2) D. Friends and Subsequences RMQ+二分

    Codeforces Round #361 (Div. 2) D. Friends and Subsequences RMQ+二分

    链接:http://codeforces.com/contest/689/problem/D题意:给出两个数组,问有多少个区间l,r满足题解:先用st表预先处理任意一个区间的最值,然后枚举每个左端点,二分找到满足条件的最...

    2017-08-17 itdadao 技术 50 ℃ 0
  • Codeforces 535D

    Codeforces 535D

    535D - Tavas and Malekas
    题目大意:给你一个模板串,给你一个 s 串的长度,告诉你 s 串中有 m 个模板串并告诉你,他们的其实位置,
    问你这样的 s 串总数的多少,答案对1e9+7取模。...

    2017-08-16 itdadao 技术 47 ℃ 0
  • Educational Codeforces Round 21 D. Array Division 前缀和

    Educational Codeforces Round 21 D. Array Division 前缀和

    链接:http://codeforces.com/contest/808/problem/D题意:给你一个数组a,问能否移动一个数的位置使得可以分成两部分,这两个部分的和相等题解:要么把后面的数移到前面,要么把前面的...

    2017-08-16 itdadao 技术 42 ℃ 0
  • Codeforces 833A The Meaningless Game

    Codeforces 833A The Meaningless Game

    Slastyona and her loyal dog Pushok are playing a meaningless game that is indeed very interesting.The game consists of multiple rounds. Its rules are very simpl...

    2017-08-15 itdadao 技术 64 ℃ 0
  • CF 703 C.D 几何(思维), D线段树离线处理.

    CF 703 C.D 几何(思维), D线段树离线处理.

    P.C
    题意:给出包含n个顶点的bus(凸包),该凸包以v每秒往x轴反向运动.有一个人在起点(0,0)以速度u往终点(0,w)走,人可以在某一个时刻停下然后继续走,人被bus撞:当人落在凸包内...

    2017-08-15 itdadao 技术 40 ℃ 0
  • Educational Codeforces Round 26 C

    Educational Codeforces Round 26 C

    Two Seals
    题意:
    思路:模拟(枚举第一个的2种摆法,暴力第二个看是否可以放下,前提是第一个可以放下)
    AC代码:

    #include "iostream"
    #include "iomanip"
    #include "string.h"
    #inclu...

    2017-08-15 itdadao 技术 48 ℃ 0
  • Codeforces Round #428 (Div. 2)A,B,C

    Codeforces Round #428 (Div. 2)A,B,C

    A. Arya and Brantime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputBran and his older sister Arya are from the...

    2017-08-14 itdadao 技术 52 ℃ 0
  • Codeforces 839E Mother of Dragons(极大团)

    Codeforces 839E Mother of Dragons(极大团)

    【题目链接】 http://codeforces.com/contest/839/problem/E【题目大意】  现在有一些点,现在你有k的液体,随意分配给这些点,   当两个点有边相连的时候,他们能产生分配...

    2017-08-14 itdadao 技术 59 ℃ 0
  • A. Arya and Bran(水题)

    A. Arya and Bran(水题)

    A. Arya and Bran

    time limit per test
    1 second

    memory limit per test
    256 megabytes

    input
    standard input

    output
    standard output


    Bran and his older sister...

    2017-08-13 itdadao 技术 57 ℃ 0
 2932    1 2 3 4 5 6 7 8 9 10 下一页 尾页