Click here to Skip to main content
14,739,795 members
Home » Discussions » C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: C++ Program to decompress a compressed string Pin
antoniu20019-Aug-19 0:27
Memberantoniu20019-Aug-19 0:27 
GeneralRe: C++ Program to decompress a compressed string Pin
Randor 19-Aug-19 0:42
professional Randor 19-Aug-19 0:42 
AnswerRe: C++ Program to decompress a compressed string Pin
antoniu20019-Aug-19 1:00
Memberantoniu20019-Aug-19 1:00 
GeneralRe: C++ Program to decompress a compressed string Pin
Randor 19-Aug-19 1:20
professional Randor 19-Aug-19 1:20 
GeneralRe: C++ Program to decompress a compressed string Pin
antoniu20021-Aug-19 2:13
Memberantoniu20021-Aug-19 2:13 
GeneralRe: C++ Program to decompress a compressed string Pin
Randor 21-Aug-19 8:22
professional Randor 21-Aug-19 8:22 
GeneralRe: C++ Program to decompress a compressed string Pin
antoniu20021-Aug-19 8:31
Memberantoniu20021-Aug-19 8:31 
GeneralRe: C++ Program to decompress a compressed string Pin
Randor 21-Aug-19 10:08
professional Randor 21-Aug-19 10:08 
Well,

I can easily make your program utilize over 1GB of memory simply by passing a large input string.

antoniu200 wrote:
The resulting string can be as big as 100'000 characters long, as stated by the Restrictions. Now, how much memory does that use? 100'000 * 8 / 8 / 1024 = 97.6 KB.

I agree. In fact that's exactly how you could detect whether or not you should process the user input. As you are parsing the input I would recommend multiplying to see if the resulting string would surpass 64MB.

antoniu200 wrote:
If I'm in any way seeing this wrong and Wrong Answer should be Caught Fatal Signal 11

Ok, well maybe something is wrong with your parser. But I've tested your code against quite a few test vectors:

10[b12[ca]]
3[a]2[bc]
3[a2[c]]
2[abc]3[cd]ef
3[a3[b]1[ab]]
3[b2[ca]]

Your code seems to be passing all of the tests I can throw at it. This is why I think you must be failing one of the test restrictions.

Best Wishes,
-David Delaune
GeneralRe: C++ Program to decompress a compressed string Pin
k505421-Aug-19 13:00
mvek505421-Aug-19 13:00 
AnswerRe: C++ Program to decompress a compressed string Pin
Stefan_Lang21-Aug-19 0:25
mveStefan_Lang21-Aug-19 0:25 
QuestionIs there a conventional name for accessing e.g. memories with fewer address bits than required, using range a selector? Pin
arnold_w12-Aug-19 5:56
Memberarnold_w12-Aug-19 5:56 
AnswerRe: Is there a conventional name for accessing e.g. memories with fewer address bits than required, using range a selector? Pin
OriginalGriff12-Aug-19 6:03
mveOriginalGriff12-Aug-19 6:03 
GeneralRe: Is there a conventional name for accessing e.g. memories with fewer address bits than required, using range a selector? Pin
Stefan_Lang12-Aug-19 23:22
mveStefan_Lang12-Aug-19 23:22 
AnswerRe: Is there a conventional name for accessing e.g. memories with fewer address bits than required, using range a selector? Pin
leon de boer12-Aug-19 16:09
Memberleon de boer12-Aug-19 16:09 
AnswerRe: Is there a conventional name for accessing e.g. memories with fewer address bits than required, using range a selector? Pin
arnold_w12-Aug-19 23:43
Memberarnold_w12-Aug-19 23:43 
GeneralRe: Is there a conventional name for accessing e.g. memories with fewer address bits than required, using range a selector? Pin
Peter_in_278013-Aug-19 2:44
professionalPeter_in_278013-Aug-19 2:44 
GeneralRe: Is there a conventional name for accessing e.g. memories with fewer address bits than required, using range a selector? Pin
leon de boer13-Aug-19 6:55
Memberleon de boer13-Aug-19 6:55 
Questionamibroker afl to dll Pin
kuleen10-Aug-19 21:37
Memberkuleen10-Aug-19 21:37 
AnswerRe: amibroker afl to dll Pin
Victor Nijegorodov10-Aug-19 22:30
MemberVictor Nijegorodov10-Aug-19 22:30 
AnswerRe: amibroker afl to dll Pin
Richard MacCutchan10-Aug-19 23:37
mveRichard MacCutchan10-Aug-19 23:37 
QuestionCTreeCtrl get individual item font ? Pin
Maximilien8-Aug-19 5:55
MemberMaximilien8-Aug-19 5:55 
AnswerRe: CTreeCtrl get individual item font ? Pin
Victor Nijegorodov8-Aug-19 10:40
MemberVictor Nijegorodov8-Aug-19 10:40 
GeneralRe: CTreeCtrl get individual item font ? Pin
Maximilien9-Aug-19 6:07
MemberMaximilien9-Aug-19 6:07 
AnswerMessage Closed Pin
9-Aug-19 1:53
MemberMember 145550709-Aug-19 1:53 
AnswerRe: CTreeCtrl get individual item font ? Pin
Victor Nijegorodov9-Aug-19 2:57
MemberVictor Nijegorodov9-Aug-19 2:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.