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 ...
Search found 90 matches
- Tue Sep 06, 2005 4:34 pm
- Forum: C++
- Topic: question about C++ STL set
- Replies: 1
- Views: 2050
- Mon Sep 05, 2005 9:36 pm
- Forum: Volume 104 (10400-10499)
- Topic: 10410 - Tree Reconstruction
- Replies: 13
- Views: 10646
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 ...
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 ...
- Wed Aug 24, 2005 1:22 pm
- Forum: Algorithms
- Topic: Seemingly easy DP problem
- Replies: 4
- Views: 2367
- Sun Aug 21, 2005 6:23 pm
- Forum: Algorithms
- Topic: Seemingly easy DP problem
- Replies: 4
- Views: 2367
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: 11782
- Sat Aug 20, 2005 8:03 am
- Forum: Volume 100 (10000-10099)
- Topic: 10069 - Distinct Subsequences
- Replies: 26
- Views: 19768
you could try a couple of inputs given here :
http://online-judge.uva.es/board/viewto ... ight=10069
also avoid creating new threads for already existing topics
http://online-judge.uva.es/board/viewto ... ight=10069
also avoid creating new threads for already existing topics
- Sat Aug 20, 2005 7:52 am
- Forum: Volume 101 (10100-10199)
- Topic: 10154 - Weights and Measures
- Replies: 60
- Views: 48620
there has been enough discussion on this problem made already:
http://online-judge.uva.es/board/viewto ... 2&start=15
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: 12276
- Thu Aug 18, 2005 4:01 pm
- Forum: Volume 1 (100-199)
- Topic: 166 - Making Change
- Replies: 31
- Views: 12276
- Sun Aug 14, 2005 12:54 pm
- Forum: Volume 108 (10800-10899)
- Topic: 10891 - Game of Sum
- Replies: 33
- Views: 18563
- Sat Aug 13, 2005 7:08 pm
- Forum: Volume 8 (800-899)
- Topic: 882 - The Mailbox Manufacturers Problem
- Replies: 4
- Views: 5868
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 ?
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: 46108
- Thu Aug 11, 2005 5:11 pm
- Forum: Volume 1 (100-199)
- Topic: 166 - Making Change
- Replies: 31
- Views: 12276
- Thu Aug 11, 2005 4:24 pm
- Forum: Volume 1 (100-199)
- Topic: 166 - Making Change
- Replies: 31
- Views: 12276
- Sun Aug 07, 2005 8:48 am
- Forum: Other words
- Topic: want the old Submit-o-matic..
- Replies: 4
- Views: 3265
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..
which i have submitted?-like it used to work earlier-... I guess the new one simply throws up the judge status..