## Search found 90 matches

Tue Sep 06, 2005 4:34 pm
Forum: C++
Topic: question about C++ STL set
Replies: 1
Views: 1662

### question about C++ STL set

i am trying to make a set of objects of type two and go like this : struct two { int a,b; }; int main(){ set<two> a ; two t; t.a=1; t.b=3; a.insert(t); set<two>::iterator i; for(i=a.begin() ; i!=a.end() ; i++) cout << a[i].a << a[i].b ; return 0; } i get error message at a.insert(t) which i'm not ab...
Mon Sep 05, 2005 9:36 pm
Forum: Volume 104 (10400-10499)
Topic: 10410 - Tree Reconstruction
Replies: 13
Views: 9059

### 10410-tree reconstruction

Can someone point out whats wrong with my algo : recurse ( bfstrace , dfstrace ) { if( size(trace)==1 ) return ; if( size(trace)==2 ) make second element child of first && return ; collect the children of bfstrace[0] starting from bfstrace[1] foreach child{ extract the bfs && dfs traces of subtree c...
Wed Aug 24, 2005 1:22 pm
Forum: Algorithms
Topic: Seemingly easy DP problem
Replies: 4
Views: 1699
streak is a sub-array .

Ex: if seq is 1 2 3 0 -1 -2 4 1 and P=1 ans is 4

N <10^5 and P<10^6*N [ i.e all vaues of in seq will be <10^6 ]

So bascially looking for a linear time algorithm
Sun Aug 21, 2005 6:23 pm
Forum: Algorithms
Topic: Seemingly easy DP problem
Replies: 4
Views: 1699

### Seemingly easy DP problem

Given a sequence of integers and an integer P find the length longest streak S such that sum of numbers in S is <= P.
Sat Aug 20, 2005 12:17 pm
Forum: Volume 100 (10000-10099)
Topic: 10051 - Tower of Cubes
Replies: 19
Views: 8688
Used DP and got WA ..cant see where the catch is . ... someone give me critical I/O please... 12 4 7 18 16 14 16 7 13 10 2 3 8 11 20 4 7 1 7 13 17 12 9 8 10 3 11 3 4 8 16 10 3 3 19 10 8 14 17 12 3 10 14 2 20 5 18 19 5 16 11 14 7 12 1 17 14 3 11 17 2 6 6 5 8 17 6 7 10 14 18 5 16 6 3 6 15 8 15 5 4 11 ...
Sat Aug 20, 2005 8:03 am
Forum: Volume 100 (10000-10099)
Topic: 10069 - Distinct Subsequences
Replies: 26
Views: 11303
you could try a couple of inputs given here :
http://online-judge.uva.es/board/viewto ... ight=10069

Sat Aug 20, 2005 7:52 am
Forum: Volume 101 (10100-10199)
Topic: 10154 - Weights and Measures
Replies: 60
Views: 39774

http://online-judge.uva.es/board/viewto ... 2&start=15
Thu Aug 18, 2005 6:07 pm
Forum: Volume 1 (100-199)
Topic: 166 - Making Change
Replies: 31
Views: 5466
just pointing out a couple of of them..

0 0 0 1 1 2 4.05
0 1 0 0 0 1 1.65

my output :
6
4

yours:
3
1
Thu Aug 18, 2005 4:01 pm
Forum: Volume 1 (100-199)
Topic: 166 - Making Change
Replies: 31
Views: 5466
the correct ans is 4 of course..but u fail a lot of cases pasted above
Sun Aug 14, 2005 12:54 pm
Forum: Volume 108 (10800-10899)
Topic: 10891 - Game of Sum
Replies: 33
Views: 12247
try these : 2 7 -2 3 2 7 3 5 1000 -1000 -1000 1000 1000 9 -823 912 -345 100000 867 -222 -991 -3 -40000 7 -23 35 -12 100000 99234 -86123 -3245 8 -23 35 12 100000 99234 -86123 -3245 -1 47 7 7 7 -7 7 -7 80 7 7 7 -7 7 -7 -7 7 -7 7 -7 7 -7 -7 7 -7 -7 -7 7 7 7 -7 7 -7 7 -7 7 7 7 -7 7 -7 7 -7 7 -7 -7 7 -7 ...
Sat Aug 13, 2005 7:08 pm
Forum: Volume 8 (800-899)
Topic: 882 - The Mailbox Manufacturers Problem
Replies: 4
Views: 4942

### 882 - The Mailbox Manufacturers Problem

I dont understand how the answer for
5 100 is 495 AFAIK the answer is 449, with the number of crakers taken at each step being:
71
87
94
98
99

But sample i/o is scarcely wrong - have i misunderstood the problem ?
Sat Aug 13, 2005 6:54 pm
Forum: Volume 6 (600-699)
Topic: 624 - CD
Replies: 77
Views: 32725
Thu Aug 11, 2005 5:11 pm
Forum: Volume 1 (100-199)
Topic: 166 - Making Change
Replies: 31
Views: 5466
AC now..i had a tiny initilization problem..
Thu Aug 11, 2005 4:24 pm
Forum: Volume 1 (100-199)
Topic: 166 - Making Change
Replies: 31
Views: 5466
getting WA again and again..whats the max value of amount i should bother to make change for ? [ i guess its only upto 6.00 ] Input 0 0 0 0 0 3 5.00 0 0 0 1 1 2 4.05 0 1 0 0 0 1 1.65 100 0 1 0 0 1 1.35 0 0 0 0 0 1 1.15 0 0 0 0 0 1 0.35 0 1 1 3 1 0 1.35 100 1 1 2 0 0 1.50 1 1 1 3 2 0 1.35 1 1 1 3 1 0...
Sun Aug 07, 2005 8:48 am
Forum: Other words
Topic: want the old Submit-o-matic..
Replies: 4
Views: 2732

### want the old Submit-o-matic..

Is it possible to view the submission status of only those problems
which i have submitted?-like it used to work earlier-... I guess the new one simply throws up the judge status..