【CodeforcesRound#276(Div.1)_html/css_WEB-ITnose】教程文章相关的互联网学习教程文章

codeforcesRound#258(div2)C解题报告_html/css_WEB-ITnose

C. Predict Outcome of the Game time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output There are n games in a football tournament. Three teams are participating in it. Currently k games had already been played. You are an avid football fan, but recently you mis...

codeforcesRound#258(div2)D解题报告_html/css_WEB-ITnose

D. Count Good Substrings time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output We call a string good, if after merging all the consecutive equal characters, the resulting string is palindrome. For example, "aabba" is good, because after the merging step it will ...

CodeforcesRound#223(Div.2)A.SerejaandDima_html/css_WEB-ITnose

Sereja and Dima time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Sereja and Dima play a game. The rules of the game are very simple. The players have n cards in a row. Each card contains a number, all numbers on the cards are distinct. The players take t...

CodeforcesRound#220(Div.2)C题:InnaandDima(记忆化搜索+DP)_html/css_WEB-ITnose

题目地址:http://codeforces.com/problemset/problem/374/C 用dp[i][j]代表第i行第j列的数可以走的最大距离。为-1时表示未走过,将走过但未走完的暂时标记为INF。这样假如有环的时候就返回INF了。然后用dfs搜。 代码如下: #include #include #include #include #include #include #include #include #include #include #include using namespace std;#define LL __int64const int INF=0x3f3f3f3f;char mp[1001][1001], str[...

CodeforcesRound#191(Div.2)-A.FlippingGame_html/css_WEB-ITnose

Flipping Game time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Iahub got bored, so he invented a game to be played on paper. He writes n integers a1,?a2,?...,?an. Each of those integers can be either 0 or 1. Hes allowed to do exactly one move: he choo...

CodeforcesRound#107(Div.2)-A.SoftDrinking_html/css_WEB-ITnose

Soft Drinking time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output This winter is so cold in Nvodsk! A group of n friends decided to buy k bottles of a soft drink called "Take-It-Light" to warm up a bit. Each bottle has l milliliters of the drink. Also they...

CodeforcesRound#149(Div.2)_html/css_WEB-ITnose

这个round真的太简单了。。 A,B就不说了 C 题目说了合法的点不会超过10^5个 那么直接离散化,完了跑bfs就行了 离散化用map就行 #include #include #include #include #include #include #include #include #include #define MAXN 111#define MAXM 55555#define INF 1000000007using namespace std;int xa, ya, xb, yb;int n;struct node { int r, x, y;}p[111111];struct P { int x, y;}f[111111];bool cm...

CodeforcesRound#156(Div.2)-A.Greg'sWorkout_html/css_WEB-ITnose

Greg's Workout time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Greg is a beginner bodybuilder. Today the gym coach gave him the training plan. All it had was n integers a1,?a2,?...,?an. These numbers mean that Greg needs to do exactly n exercises today...

CodeforcesRound#175(Div.2)-A.SlightlyDecreasingPermutations_html/css_WEB-ITnose

Slightly Decreasing Permutations time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Permutation p is an ordered set of integers p1,??p2,??...,??pn, consisting of n distinct positive integers, each of them doesnt exceed n. Well denote the i-th element of p...

CodeforcesRound#144(Div.2)-A.PerfectPermutation_html/css_WEB-ITnose

Perfect Permutation time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output A permutation is a sequence of integers p1,?p2,?...,?pn, consisting of n distinct positive integers, each of them doesnt exceed n. Lets denote the i-th element of permutation p as pi. ...

CodeforcesRound#160(Div.2)-A.RomaandLuckyNumbers_html/css_WEB-ITnose

Roma and Lucky Numbers time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Roma (a popular Russian name that means Roman) loves the Little Lvov Elephants lucky numbers. Let us remind you that lucky numbers are positive integers whose decimal representati...

CodeforcesRound#168(Div.2)-A.LightsOut_html/css_WEB-ITnose

Lights Out time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Lenny is playing a game on a 3??3 grid of lights. In the beginning of the game all lights are switched on. Pressing any of the lights will toggle it and all side-adjacent lights. The goal of th...

CodeforcesRound#190(Div.2)-A.CielandDancing_html/css_WEB-ITnose

Ciel and Dancing time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Fox Ciel and her friends are in a dancing room. There are n boys and m girls here, and they never danced before. There will be some songs, during each song, there must be exactly one boy a...

CodeforcesRound#135(Div.2)-A.k-String_html/css_WEB-ITnose

k-String time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output A string is called a k-string if it can be represented as k concatenated copies of some string. For example, the string "aabaabaabaab" is at the same time a 1-string, a 2-string and a 4-string, b...

CodeforcesRound#112(Div.2)-A.SupercentralPoint_html/css_WEB-ITnose

Supercentral Point time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output One day Vasya painted a Cartesian coordinate system on a piece of paper and marked some set of points (x1,?y1),?(x2,?y2),?...,?(xn,?yn). Lets define neighbors for some fixed point from ...