自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

ProLights的博客

Someday, you can program the lights.

  • 博客(14)
  • 收藏
  • 关注

原创 Summer Training Team Selection (1) Problem D Hidden Password STL,字符串匹配,简单题

先用map记录下来password中每个字母出现的次数;然后去历遍message,如果当前访问的不是正在查找的,并且在map中的记录里不是0,那么FAIL 如果是则,map里想要的字母--,然后查找password中的下一个字母复杂度 O(n)

2016-04-30 22:31:07 4114

原创 Summer Training Team Selection (1) Problem F Line Them Up 判断升序降序

给n个字符串判断升序还是降序还是乱序就定义一个, m = n;nn = n;然后如果降了一次m--;如果升了一次m++最好用m和n比较这个方法好像处理简单的字符串的时候挺常用的if(2*nn == m+1) printf("INCREASING");else if(m == 1) printf("DECREASING");else printf("NEITHER");

2016-04-30 22:20:39 4133

原创 Summer Training Team Selection (1) Problem A ACM Contest Scoring 水题

快半个月没有把自己的代码什么更新上来了,这两周既是期中考试又是数据结构专题training,然后今晚专题结束才能把早就放在草稿箱的那些放出来☺今天下午一次队内赛,做的中东的区域赛的。感觉自己太智障了,第一题还CE了一次time标识符在BC上都好用的,但OJ说不行,以后用_time或者什么好了,然后输出格式没有注意就交了一发,……Problem A ACM Contest ScoringOur new contest submission system keeps a chronological log

2016-04-30 21:50:55 3891

原创 Topcoder SRM 687 (Div 2) 500.Quacking __ string matches

Ducks have started mysteriously appearing in your room. All ducks make the same sound: "quack". Each duck makes the sound one or more times, one after another. For example, valid sounds for a single duck are "quack", "quackquackquackquack", "quackquack", e

2016-04-15 01:34:59 3180

原创 Topcoder SRM 687 (Div 2) 250.Quorum __ sort

In one organization they have n different committees. The organization has a very large number of employees. Each employee is a member of each committee.Each committee has a quorum: the smallest number of members that have to be present to have an officia

2016-04-15 01:30:59 2180

原创 Topcoder SRM 413 (Div 2) 1000.InfiniteSequence

Let's consider an infinite sequence A defined as follows:A0 = 1;Ai = A[i/p] + A[i/q] for all i >= 1, where [x] denotes the floor function of x. (see Notes)You will be given n, p and q. Return the n-th element of A (index is 0-based).

2016-04-14 19:20:21 1017

原创 Codeforces Round #345 (Div. 2) D. Image Preview __ two pointers and pretreat

Vasya's telephone contains n photos. Photo number 1 is currently opened on the phone. It is allowed to move left and right to the adjacent photo by swiping finger over the screen. If you swipe left from the first photo, you reach photo n. Similarly, by swi

2016-04-14 11:31:10 1673

原创 Codeforces Round #345 (Div. 2) C. Watchmen __ map , sorting and combinatorics

Watchmen are in a danger and Doctor Manhattan together with his friend Daniel Dreiberg should warn them as soon as possible. There are n watchmen on a plane, the i-th watchman is located at point (xi, yi).They need to arrange a plan, but there are some di

2016-04-08 21:35:07 1407

原创 Codeforces Round #345 (Div. 2) B. Beautiful Paintings __ greedy and Bucket_sort

There are n pictures delivered for the new exhibition. The i-th painting has beauty ai. We know that a visitor becomes happy every time he passes from a painting to a more beautiful one.We are allowed to arranged pictures in any order. What is the maximum

2016-04-08 21:20:24 2296

原创 Codeforces Round #345 (Div. 2) A. Joysticks __ greedy and simulation

Friends are going to play console. They have two joysticks and only one charger for them. Initially first joystick is charged at a1 percent and second one is charged at a2 percent. You can connect charger to a joystick only at the beginning of each minute.

2016-04-08 21:10:36 1861

原创 UESTC 1299 Date 预处理、打表、找周期、前缀和

A special day is the day that is xth day in that month, and happens to be xth day in that week.In February 1st in 2016, this day in that month happens to be the first day in that week, so we call it a special day.Now, given a time interval, how many spec

2016-04-04 23:10:31 1925

原创 The 14th UESTC Programming Contest Final I - Intersection 计算几何、积分、精度

Consider such a simple math problem:There is a sphere and a right circular cone. The center of the sphere coincide with the apex of cone, and the height of the cone is equal to the radius of the sphere.Could you tell me the volume of the intersection of

2016-04-03 12:59:48 2084

原创 The 14th UESTC Programming Contest Final B - Banana Watch 预处理、前缀和

As a famous technology company, Banana Inc. invents Banana Watch, redefining the watch.While a normal watch has 12 indexes and two or three moving hands, a Banana Watch has n indexes and a moving hand.The moving hand is at 0 initially, and in 1st second,

2016-04-03 12:45:24 1777

原创 The 14th UESTC Programming Contest Final Warmup D - Cube

As a student of the applied mathematics school of UESTC, WCM likes mathematics. Some day he found an interesting theorem that every positive integer's cube can be expressed as the sum of some continuous odd positive integers. For example,Facing such a pe

2016-04-03 12:31:40 1960

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除