Search found 28 matches
- Fri Jun 05, 2020 12:52 pm
- Forum: Volume 10 (1000-1099)
- Topic: 1047 - Zones
- Replies: 18
- Views: 6430
Re: 1047 - Zones
I've found the following formula for calculating overlapping areas from https://blog.csdn.net/bigdata_lijun/article/details/11024721: Suppose there are m overlapping regions, where o[1] to o[m] are sets of regions, from input. The numbers of customers are stored in c[1] to c[m], also from input. dp ...
- Wed May 22, 2013 6:01 pm
- Forum: Volume 102 (10200-10299)
- Topic: 10293 - Word Length and Frequency
- Replies: 18
- Views: 8366
Re: 10293 - Word Length and Frequency
There are extra lines after the last # line, as the following program reaches the time limit.
Code: Select all
#include <iostream>
using namespace std;
int main() {
string s;
while (getline(cin, s));
if (s[0] != '#')
for (;;);
}
- Wed Apr 24, 2013 1:29 pm
- Forum: Volume 110 (11000-11099)
- Topic: 11063 - B2-Sequence
- Replies: 73
- Views: 41954
Re: 11063 - B2-Sequence
Try this:
Code: Select all
3
1 3 5
- Mon Aug 30, 2004 1:03 pm
- Forum: Volume 107 (10700-10799)
- Topic: 10700 - Camel trading
- Replies: 32
- Views: 14967
Re: problem with 10700
Did you define infinity correctly? That was my problem.Eduard wrote:I don't know why i'm geting WA.My solution is good solution I use DP and get right answers for simple input.
I saw that nobody at this moment have got this problem AC by Pascal.
Whats wrong.
- Sun Aug 08, 2004 3:19 pm
- Forum: C++
- Topic: Woes of strstream
- Replies: 4
- Views: 2191
The longer I think about it, the easier my question looks. You are right, Krzysztof, I could do that, at the cost of a bit more typing. I could also create a big struct/class to include everything. For each test case, I declear an object of it and consequently get an empty strstream object. [cpp]str...
- Sat Aug 07, 2004 3:25 pm
- Forum: C++
- Topic: Woes of strstream
- Replies: 4
- Views: 2191
- Sat Aug 07, 2004 12:48 pm
- Forum: C++
- Topic: Woes of strstream
- Replies: 4
- Views: 2191
Woes of strstream
I've been able to keep strstream objects local before. But not this time. Now I need a global strstream object (as my global functions need it), which has to be emptied before every test case. I've tried to use a reference by declaring [cpp]strstream ∈[/cpp] However, whenever I say [cpp]int m...
- Thu Jun 17, 2004 6:03 am
- Forum: Volume 106 (10600-10699)
- Topic: 10671 - Grid Speed
- Replies: 2
- Views: 1789
10671 - Grid Speed
I have some difficulty with the second sample test case. My program reports it is possible to travel, and I have to agree! My diagram looks like this 8) 20 /--<--S 7) 10 | 6) 20 | 5) 10 | 4) 30 T--<--/ 3) 20 2) 20 1) 10 10 20 20 30 10 20 10 10 1) 2) 3) 4) 5) 6) 7) 8) Going along the route indicted a...
- Fri Jun 11, 2004 12:10 pm
- Forum: Other words
- Topic: acm solve sites
- Replies: 51
- Views: 27047
- Sat Jun 05, 2004 12:09 pm
- Forum: Volume 105 (10500-10599)
- Topic: 10520 - Determine it
- Replies: 15
- Views: 8693
- Thu Jun 03, 2004 11:59 am
- Forum: Volume 6 (600-699)
- Topic: 679 - Dropping Balls
- Replies: 5
- Views: 5593
679 - Dropping Balls
I notice that the reverse of I - 1 (in binary form) is the position of the ball in the last row. For example, when n = 4, I = 1 = 000 + 1, p = 000 = 0, ans = 0 + 2**3; I = 2 = 001 + 1, p = 100 = 4, ans = 4 + 2**3; I = 3 = 010 + 1, p = 010 = 2, ans = 2 + 2**3; I = 4 = 011 + 1, p = 110 = 6, ans = 6 + ...
- Thu Jun 03, 2004 10:03 am
- Forum: Off topic (General chit-chat)
- Topic: How old are you? Statistics.
- Replies: 121
- Views: 180505
- Tue Jun 01, 2004 10:44 am
- Forum: Off topic (General chit-chat)
- Topic: Isn't this nice?
- Replies: 0
- Views: 1675
Isn't this nice?
This is Pascal's triangle, with '.' represent odd number of digits and '#' even number of digits. I got this as a by-product when doing Problem 10219 Find the ways! Isn't it nice? (Best viewed at 1024 x 768) . . . . . . . . . . . . . . . . . # # . . . . # # # . . . . # # # # . . . . # # # # # . . . ...
- Sat May 29, 2004 1:57 pm
- Forum: C++
- Topic: How to skip lines while using cin <<
- Replies: 7
- Views: 5012
- Fri May 21, 2004 8:25 pm
- Forum: Volume 101 (10100-10199)
- Topic: 10190 - Divide, But Not Quite Conquer!
- Replies: 105
- Views: 26324