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

CodeforcesRound#273(Div.2)BRandomTeams_html/css_WEB-ITnose

题目链接:Random Teams B. Random Teams time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output n participants of the competition were split into m teams in some manner so that each team has at least one participant. After the competition each pair of p...

CodeforcesRound#274(Div.2)BTowers_html/css_WEB-ITnose

题目链接:Towers Towers time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output As you know, all the kids in Berland love playing with cubes. Little Petya has n towers consisting of cubes of the same size. Tower with number i consists of ai cubes st...

CodeforcesRound#272(Div.2)题解_html/css_WEB-ITnose

Codeforces Round #272 (Div. 2) A. Dreamoon and Stairs time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Dreamoon wants to c...

CodeforcesRound#274(Div.1)ABC_html/css_WEB-ITnose

昨天一觉起来都5点半了。。没来的及玩,补的题。。 A题:http://codeforces.com/contest/480/problem/A A. Exams time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Student Valera is an undergraduate student at the University. His end of term exams are appr...

CodeforcesRound#274(Div.2)解题报告_html/css_WEB-ITnose

题目地址:http://codeforces.com/contest/479 这次自己又只能做出4道题来。 A题:Expression 水题。 枚举六种情况求最大值即可。 代码如下: #include #include #include #include #include #include #include #include #include #include #include using namespace std;#define LL __int64int main(){ LL a, b, c, d[10]; while(scanf("%I64d%I64d%I64d",&a,&b,&c)!=EOF) { d[0]=a*b*c; d[1]=(a+...

CodeforcesRound#273(Div.2)AInitialBet_html/css_WEB-ITnose

题目链接:Initial Bet Initial Bet time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output There are five people playing a game called "Generosity". Each person gives some non-zero number of coins b as an initial bet. Af...

CodeforcesRound#274(Div.2)B.Towers_html/css_WEB-ITnose

As you know, all the kids in Berland love playing with cubes. Little Petya has n towers consisting of cubes of the same size. Tower with number i consists of ai cubes stacked one on top of the other. Petya defines the instability of a set of towers as a value equal to the difference between the heights of the highest and the lowest of the towers. For example, if Petya built five cube towers with h...

CodeforcesRound#274(Div.2)D.LongJumps_html/css_WEB-ITnose

Valery is a PE teacher at a school in Berland. Soon the students are going to take a test in long jumps, and Valery has lost his favorite ruler! However, there is no reason for disappointment, as Valery has found another ruler, its length is l centimeters. The ruler already has nmarks, with which he can make measurements. We assume that the marks are numbered from 1 to n in the order they appea...

CodeforcesRound#274(Div.2)E.RidinginaLift(DP)_html/css_WEB-ITnose

Imagine that you are in a building that has exactly n floors. You can move between the floors in a lift. Let's number the floors from bottom to top with integers from 1 to n. Now you're on the floor number a. You are very bored, so you want to take the lift. Floor number b has a secret lab, the entry is forbidden. However, you already are in the mood and decide to make k consecutive trips in the l...

CodeforcesRound#274(Div.2)C.Exams_html/css_WEB-ITnose

Student Valera is an undergraduate student at the University. His end of term exams are approaching and he is to pass exactly n exams. Valera is a smart guy, so he will be able to pass any exam he takes on his first try. Besides, he can take several exams on one day, and in any order. According to the schedule, a student can take the exam for the i-th subject on the day number ai. However, Vale...

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

C. Pashmak and Buses time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Recently Pashmak has been employed in a transportation company. The company has k buses and has a contract with a school which hasn students. The school planned to take the students to d d...

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

D. Pashmak and Parmida's problem time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output Parmida is a clever girl and she wants to participate in Olympiads this year. Of course she wants her partner to be clever too (although hes not)! Parmida has prepared the fol...

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

D. A Lot of Games time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Andrew, Fedor and Alex are inventive guys. Now they invent the game with strings for two players. Given a group of n non-empty strings. During the game two players build the word together,...

C.DiversePermutation(CodeforcesRound#275(div2)_html/css_WEB-ITnose

C. Diverse Permutation time limit per test 1 second 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 not larger than n. Well denote as nthe length of permutation p1,???p2,???......

CodeforcesRound#275(Div.2)C

题目链接:Codeforces Round #275 (Div. 2) C - Diverse Permutation 题意:一串排列1~n。求一个序列其中相邻两项差的绝对值的个数(指绝对值不同的个数)为k个。求序列、 思路:1~k+1。构造序列前段,之后直接输出剩下的数。前面的构造可以根据,两项差的绝对值为1~k构造。 AC代码: #include #include int ans[200010];bool vis[100010];int n,mark;int iabs(int a){ if(a<0) return -a; return a;}int main()...