IT大道IT大道

首页 > TAG信息列表 > codeforces

  • 「6月雅礼集训 2017 Day10」perm(CodeForces 698F)

    「6月雅礼集训 2017 Day10」perm(CodeForces 698F)

    【题目大意】
    给出一个$n$个数的序列$\{a_n\}$,其中有些地方的数为0,要求你把这个序列填成一个1到$n$的排列,使得:
    $(a_i, a_j) = 1$,当且仅当$(i, j) = 1$。多组数据。
    $n \leq...

    2017-06-26 itdadao 技术 12 ℃ 0
  • #420(div2)A. Okabe and Future Gadget Laboratory

    #420(div2)A. Okabe and Future Gadget Laboratory

    题意:给出n*n的矩阵,问该矩阵中不为1的数字是否能由该行的某个数+该列的某个数得到,输出yes,否则no
    思路:暴力

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

    2017-06-26 itdadao 技术 19 ℃ 0
  • codeforces round #419 E. Karen and Supermarket

    codeforces round #419 E. Karen and Supermarket

    On the way home, Karen decided to stop by the supermarket to buy some groceries.

    She needs to buy a lot of goods, but since she is a student her budget is sti...

    2017-06-24 itdadao 技术 16 ℃ 0
  • #333 Div2 Problem B Approximating a Constant Range (尺取 && RMQ || 尺取 && multiset)

    #333 Div2 Problem B Approximating a Constant Range (尺取 && RMQ || 尺取 && multiset)

    题目链接:http://codeforces.com/contest/602/problem/B

    题意 :给出一个含有 n 个数的区间,要求找出一个最大的连续子区间使得这个子区间的最大值和最小值的差值不超过 1 ,最后...

    2017-06-23 itdadao 技术 18 ℃ 0
  • Codeforces Round #298 (Div. 2)A B C D

    Codeforces Round #298 (Div. 2)A B C D

    A. Examtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAn exam for n students will take place in a long and...

    2017-06-21 itdadao 技术 17 ℃ 0
  • #256 (Div. 2)D. Multiplication Table

    #256 (Div. 2)D. Multiplication Table

    题意:给出n,m,k,问(1.....n)*(1......m)共有n*m个答案,问第k小
    思路:很熟悉的样子,和51nod的第K大类似

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

    2017-06-21 itdadao 技术 17 ℃ 0
  • #256 (Div. 2)C. Painting Fence

    #256 (Div. 2)C. Painting Fence

    题意:给出篱笆的高度,宽度都是1,我们用宽度为1的刷子刷,只能横着或者竖着刷,连续的,问最少多少次全刷完
    思路:我们可以全部竖着刷,N次,然后我们如果横着的话就是连续的非0数列中最短...

    2017-06-20 itdadao 技术 20 ℃ 0
  • #256 (Div. 2)B. Suffix Structures

    #256 (Div. 2)B. Suffix Structures

    题意:2种操作,第一种删除任意字符,第二种交换任意2个字符位置,如果能让A,B字符串相等,只用第一种操作输出automaton,只用第二种输出array,2种都用both ,否则输出need tree
    思路:我们...

    2017-06-20 itdadao 技术 18 ℃ 0
  • #256 (Div. 2)A. Rewards

    #256 (Div. 2)A. Rewards

    题意:三种奖杯各ai个,三种奖牌各bi个,给出N个柜子,每个柜子不能同时放奖杯奖牌,不能放大于5个奖杯,10个奖牌
    思路:水

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

    2017-06-20 itdadao 技术 16 ℃ 0
  • Codeforces Round #340 (Div. 2) E 莫队+前缀异或和

    Codeforces Round #340 (Div. 2) E 莫队+前缀异或和

    E. XOR and Favorite Numbertime limit per test4 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputBob has a favorite number k and...

    2017-06-19 itdadao 技术 16 ℃ 0
  • #419 Div2 Problem C Karen and Game (贪心 && 暴力)

    #419 Div2 Problem C Karen and Game (贪心 && 暴力)

    题意 :给出一个 n*m 的变化后的矩阵,变化前矩阵的元素全是0,变化的规则是选择其中的一行或者一列将元素进行加一操作,问你最少用几步操作能将全零的矩阵变成一开始输入的矩阵,如...

    2017-06-18 itdadao 技术 19 ℃ 0
  • #419 Div2 Problem B Karen and Coffee (统计区间重叠部分 && 前缀和)

    #419 Div2 Problem B Karen and Coffee (统计区间重叠部分 && 前缀和)

    题目链接 :http://codeforces.com/contest/816/problem/B
    题意 :给出 n 表示区间个数,限定值 k 以及问询次数 q,当一个数被大于或等于 k 个区间重复覆盖时才算有效数,每一次问询...

    2017-06-18 itdadao 技术 25 ℃ 0
  • Codeforces Round #419 (Div. 2) C. Karen and Game

    Codeforces Round #419 (Div. 2) C. Karen and Game

    C. Karen and Gametime limit per test2 secondsmemory limit per test512 megabytesinputstandard inputoutputstandard outputOn the way to school, Karen became fixate...

    2017-06-18 itdadao 技术 31 ℃ 0
  • B. Makes And The Product

    B. Makes And The Product

    原题地址



    原题地址:http://codeforces.com/contest/817/problem/B?csrf_token=0c0d6f2e840e29e82ee292038434d486



    解题思想





    /*
    方法一:
    第一步:从小到大排序
    第二步...

    2017-06-18 itdadao 技术 16 ℃ 0
  • #419(div2) C. Karen and Game

    #419(div2) C. Karen and Game

    题意:给出一个n*m的矩阵,然后我们可以每一行-1,每一列-1,问是否可以全部变成0
    思路:最开始的时候马上就想到了无论怎样,他每一行该减去的时候无论先后都要减去,那么我每一行取一个...

    2017-06-18 itdadao 技术 18 ℃ 0
  • #419(div2) B. Karen and Coffee

    #419(div2) B. Karen and Coffee

    题意:给出n个温度区间,k,Q个询问,每个询问给出一个温度区间x--y。问这之间有多少个温度在给出K的温度区间内。
    思路:前缀和小技巧

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

    2017-06-18 itdadao 技术 18 ℃ 0
  • #419(div2) AA. Karen and Morning

    #419(div2) AA. Karen and Morning

    题意:给出某个时刻,问多少秒后时刻变成回文的了
    思路:A题就直接暴力咯,一秒一秒加,判断,注意:24点为0点

    1 #include<bits/stdc++.h>
    2 using namespace std;
    3
    4 int main(){...

    2017-06-18 itdadao 技术 18 ℃ 0
  • codeforces round #405 B. Bear and Friendship Condition

    codeforces round #405 B. Bear and Friendship Condition

    B. Bear and Friendship Condition

    time limit per test
    1 second

    memory limit per test
    256 megabytes

    input
    standard input

    output
    standard output


    Bear Limak...

    2017-06-18 itdadao 技术 12 ℃ 0
  • codeforces round #419  C. Karen and Game

    codeforces round #419 C. Karen and Game

    C. Karen and Game

    time limit per test
    2 seconds

    memory limit per test
    512 megabytes

    input
    standard input

    output
    standard output


    On the way to school,...

    2017-06-18 itdadao 技术 45 ℃ 0
  • codeforces round #419 B. Karen and Coffee

    codeforces round #419 B. Karen and Coffee

    To stay woke and attentive during classes, Karen needs some coffee!

    Karen, a coffee aficionado, wants to know the optimal temperature for brewing the perfect...

    2017-06-18 itdadao 技术 39 ℃ 0
  • Codeforces Round #419 (Div. 2) A B C 暴力 区间更新技巧 模拟

    Codeforces Round #419 (Div. 2) A B C 暴力 区间更新技巧 模拟

    A. Karen and Morningtime limit per test2 secondsmemory limit per test512 megabytesinputstandard inputoutputstandard outputKaren is getting ready for a new schoo...

    2017-06-18 itdadao 技术 25 ℃ 0
  • Codeforces Round #419 A+B

    Codeforces Round #419 A+B

    A. Karen and Morningtime limit per test 2 secondsmemory limit per test 512 megabytesKaren is getting ready for a new school day!It is currently hh:mm, given i...

    2017-06-18 itdadao 技术 19 ℃ 0
  • Codeforces Round #419 (Div. 2)C. Karen and Game

    Codeforces Round #419 (Div. 2)C. Karen and Game

    C. Karen and Game

    给定n行m列数字,每次可以让一行或一列都减一,求出让全部数字全为0的最小的次数,没有则输出-1;
    比赛时没有考虑,n和m的大小问题,被hack了。5555555555555555555...

    2017-06-18 itdadao 技术 28 ℃ 0
  • Codeforces Round #419 (Div. 2)B. Karen and Coffee

    Codeforces Round #419 (Div. 2)B. Karen and Coffee

    B. Karen and Coffee

    题意:给定n个区间,当一个数在k个区间以内则这个数可以被选中。有q个询问,问在某个区间能有多少个数可以被选中。

    1 #include <iostream>
    2 #include <...

    2017-06-18 itdadao 技术 19 ℃ 0
  • Codeforces Round #419 (Div. 2) B. Karen and Coffee

    Codeforces Round #419 (Div. 2) B. Karen and Coffee

    B. Karen and Coffee

    time limit per test
    2.5 seconds

    memory limit per test
    512 megabytes

    input
    standard input

    output
    standard output


    To stay woke and...

    2017-06-18 itdadao 技术 39 ℃ 0
 2703    1 2 3 4 5 6 7 8 9 10 下一页 尾页
标签列表