water's blog

By water, 10 years ago, In English

When I was sovling the[problem:356C],my java code got TEL but c++ code got AC,why? The core code of them is the same. JAVA:4857792 C++:4857784

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By water, 11 years ago, In English

When I solve 313C - Ilya and Matrix, I got WA on testcases 11 :(.my submission is 3805151. Can you help me ? :)

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By water, 11 years ago, In English

I saw many people got wrong on test10 in problem A #174 DIV1 . It says "wrong answer 103366th numbers differ — expected: '-1310.8301270', found: '-1310.8321289', error = '0.0000015",what's wrong? 3352253

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By water, 11 years ago, In English

I advice we open a new webpage in codeforces and collect all the editorials.

Full text and comments »

  • Vote: I like it
  • +9
  • Vote: I do not like it

By water, 11 years ago, In English

I am a student in China. I used to practice in POJ,ZOJ,or HDUoj,but when I came across a problem I can't get much help especially when I can't understand the tuturial. But at codeforces I can have a heated discuss with others. I really get much help and I thanks all of you.

Full text and comments »

  • Vote: I like it
  • +17
  • Vote: I do not like it

By water, 11 years ago, In English

I still can't figure out how to solve this problem after I read the tuturial. Can you write your idea carefully :(

Full text and comments »

  • Vote: I like it
  • -8
  • Vote: I do not like it

By water, 11 years ago, In English

what's wrong with my code of 158_DIV2_C? Here is my submission:2847080

Full text and comments »

  • Vote: I like it
  • -8
  • Vote: I do not like it

By water, 11 years ago, In English

My rating is just 1453 but I still wanner write my own tutorial to share with you.

A. 252A - Little Xor This is a simple problem. We can write a algorithm using brute force. The complexity of it is O(n^3). My code 2713341.

B.252B - Unsorting Array This is a greedy problem. There are several special cases: 1. There is only one or two interger. Answer is "-1". 2. There are three interger and they are placed like "1 2 1" or "2 1 2", whatever you do you will make an sorted array. 3. All the numbers are the same so we can't make any operation. 4. Here are other cases: We find the first unequal pair searching from the head of the array, then we swap them. We will get the unsorted array unless what happen below: The pair are the first two numbers and the second is the max number or the min number. So we just search the unequal pair from the trail and swap them then we will get the right answer.The complexity of it is O(n). My code 2714096

C.251A - Points on Line This is a DP problem. We user two pointers and one points to the left most interger and the other points to the right most interger.For every left points we need find out the right most interger, then we just calculate C(r-l+1,2) means we pick up two intergers from the sequences freely. Because the position of the right interger can't decrease so the complexity of it is O(n*2).My code 2704914

These are the problem I solved in the contest. Sorry for my poor English and bad code ability. You may seek the official editorial for more infomation.

Full text and comments »

  • Vote: I like it
  • -4
  • Vote: I do not like it

By water, 12 years ago, In English

As a newbie,I really wanner learn from the problem.But some are too hard to solve even after the contest.So can we make a displine that every auther who hold the contest should write the editorial or find someone else to write it? If so, it will help us newbies a lot.

Full text and comments »

  • Vote: I like it
  • +15
  • Vote: I do not like it