why my solution gives WA,in 9th test case. http://codeforces.me/contest/472/submission/8035297
| # | User | Rating |
|---|---|---|
| 1 | Benq | 3676 |
| 2 | Kevin114514 | 3659 |
| 3 | jiangly | 3640 |
| 4 | turmax | 3450 |
| 5 | tourist | 3408 |
| 6 | strapple | 3360 |
| 7 | Um_nik | 3354 |
| 8 | squareOf105 | 3348 |
| 9 | maroonrk | 3312 |
| 10 | idontwannadothis…e | 3191 |
| # | User | Contrib. |
|---|---|---|
| 1 | Qingyu | 154 |
| 2 | nik_exists | 151 |
| 3 | maspy | 149 |
| 4 | AmShZ | 146 |
| 5 | Um_nik | 143 |
| 6 | Errichto | 139 |
| 7 | BledDest | 136 |
| 8 | adamant | 135 |
| 9 | maroonrk | 133 |
| 10 | cry | 130 |
why my solution gives WA,in 9th test case. http://codeforces.me/contest/472/submission/8035297
Getting MLE,can anyone plz help.
problem:http://www.lightoj.com/volume_showproblem.php?problem=1114
I am trying to generate all possible unique permutation by using bitmask , code:(http://ideone.com/2SZyGh) .but how can i handle the repeated value.
EX. for the input 112 output should be(112,121,211).But my code give 6 permutation with 3 same value.
Can anyone please give me hints,how to solve this problem.
1083 — Histogram PDF (English) Statistics Forum Time Limit: 2 second(s) Memory Limit: 64 MB
A histogram is a polygon composed of a sequence of rectangles aligned at a common base line. The rectangles have equal widths but may have different heights. For example, the figure shows the histogram that consists of rectangles with the heights 2, 1, 4, 5, 1, 3, 3 measured in units where the width of the rectangles is 1.
Usually, histograms are used to represent discrete distributions, e.g., the frequencies of characters in texts. Note that the order of the rectangles, i.e., their heights, is important. Calculate the area of the largest rectangle in a histogram that is aligned at the common base line, too. The figure on the right shows the largest aligned rectangle for the depicted histogram. Input
Input starts with an integer T (≤ 20), denoting the number of test cases.
Each case contains a line with an integer N (1 ≤ N ≤ 30000) denoting the number of rectangles. The next line contains N space separated positive integers (≤ 30000) denoting the heights. Output
For each case, print the case number and the largest rectangle that can be made. Sample Input
Output for Sample Input
2
7
2 1 4 5 1 3 3
5
4 4 3 2 4
Case 1: 8
Case 2: 10 Note
Dataset is huge; use faster I/O methods.
How to find out segment tree problems in codeforces problemset.
| Name |
|---|


