Search found 119 matches
- Sun Oct 12, 2008 8:49 pm
- Forum: Volume 110 (11000-11099)
- Topic: 11055 - Homogeneous squares
- Replies: 16
- Views: 9139
Re: 11055 - Homogeneous squares
EDIT: I made a stupid mistake, sorry
- Sun Jun 10, 2007 11:21 pm
- Forum: C++
- Topic: reading words from input...
- Replies: 7
- Views: 3835
- Sun Jun 10, 2007 8:36 pm
- Forum: C++
- Topic: reading words from input...
- Replies: 7
- Views: 3835
- Sun Jun 10, 2007 6:37 pm
- Forum: C++
- Topic: reading words from input...
- Replies: 7
- Views: 3835
- Sun Jun 10, 2007 4:02 am
- Forum: C++
- Topic: reading words from input...
- Replies: 7
- Views: 3835
reading words from input...
Hi... I need help to do the following: I want to take from standard input a line like this " word1 word2 word3 wordn" and get all the words in differents strings (strings from <string> of course) does someone know an easy way to do it?? is it any other way (easier) to manage the words in a...
- Tue Apr 24, 2007 6:40 pm
- Forum: Algorithms
- Topic: tju problem
- Replies: 0
- Views: 2333
tju problem
Hi, I would like to know if someone can help me with this problem: http://acm.tju.edu.cn/toj/showp2171.html This is what I tought until now: I can go from first character to last character and sum S %2006 To know the S of every character I know that S[0]=1 S = i/k | min k (S[i-k]=(i-k)/k && ...
- Thu Feb 15, 2007 4:47 pm
- Forum: Volume 10 (1000-1099)
- Topic: 1051 - Bipartite Numbers
- Replies: 0
- Views: 1927
1051 - Bipartite Numbers
Hi! the problem I was trying to solve is 3564 - Bipartite Numbers http://acmicpc-live-archive.uva.es/nuevoportal/data/problem.php?p=3564 I just think in generating bipartite numbers and then return the minimum that is valid...but maybe the solution can be bigger than long long numbers, in this case ...
- Sat Oct 07, 2006 4:34 am
- Forum: Algorithms
- Topic: dfs /bfs problems
- Replies: 1
- Views: 4586
dfs /bfs problems
HI!
I want to practice dfs/bfs problems. I would appreciate if someone knows which problems can be solved with this.
thx
I want to practice dfs/bfs problems. I would appreciate if someone knows which problems can be solved with this.
thx
- Wed Jun 07, 2006 7:15 am
- Forum: Volume 110 (11000-11099)
- Topic: 11047 - The Scrooge Co Problem
- Replies: 31
- Views: 17671
Hi ! I did this problem in 2 ways but none of these works I always get WA!! :cry: here are my codes: #include <stdio.h> #include <stdlib.h> #include <string.h> #define MIN(a,b) a<b?a:b char loc[101][22]; int d[101][101],dist[102],antecesor[102]; bool visited[101]; char init[22],end[22],name[32]; int...
- Thu Jun 01, 2006 4:46 am
- Forum: Volume 110 (11000-11099)
- Topic: 11038 - How Many O's?
- Replies: 24
- Views: 12533
- Tue May 30, 2006 5:16 am
- Forum: Volume 110 (11000-11099)
- Topic: 11038 - How Many O's?
- Replies: 24
- Views: 12533
- Mon May 29, 2006 4:44 am
- Forum: Volume 110 (11000-11099)
- Topic: 11038 - How Many O's?
- Replies: 24
- Views: 12533
hi, I have difficulty with this problem I think it in this way: from 0..9 I have one 0 from 0..99 I have ten 0's so I think it in this way: cant representes amount of 0's from 0..(10^i - 1) so I have cant[1]=1 cant[2]=10 for(i=3;i<11;i++) cant =9*(cant[i-1]+pow(10,i-2)) + cant[i-1]; I though this: s...
- Sat May 20, 2006 1:19 am
- Forum: Algorithms
- Topic: help with divide & conquer problem
- Replies: 3
- Views: 2049
- Sun May 14, 2006 9:15 pm
- Forum: Algorithms
- Topic: help with divide & conquer problem
- Replies: 3
- Views: 2049
help with divide & conquer problem
Hi ! I am having troubles in doing an implementation of a very common problem. I have a matrix A and I want to get the matrix A^n. As far as I know the best way to do this is to make something like: A^(n/2)*A^(n/2) if n mod 2==0 A^(n-1)*A if n mod 2 !=0 I get the idea of the recursive algorithm, but...
- Wed Dec 28, 2005 10:49 pm
- Forum: Algorithms
- Topic: complexity problem
- Replies: 2
- Views: 1546
complexity problem
I need help to prove a problem about complexity. Let a Function defined by: F(0) = 3 F(n+1) = 3 * F(n) + h(n), where h ∈ θ(n) Prove that F ∈ O(3^n) I get that the function is O(n*3^n), but I don't know if I did it wrong or how to do it Please ask me if the problem is not clear enough. thanks for rea...