Search found 163 matches

by Emilio
Wed Dec 28, 2005 3:02 am
Forum: Volume 109 (10900-10999)
Topic: 10914 - Abundance and Perfect Numbers
Replies: 20
Views: 8503

The size is 10^7, and I'm sure is approximately 10MB.
bool type is processed a byte like.
By other hand 10^8 ints is about 400MB.
by Emilio
Tue Dec 27, 2005 3:00 am
Forum: Volume 109 (10900-10999)
Topic: 10914 - Abundance and Perfect Numbers
Replies: 20
Views: 8503

MLE, why?
Your bool array is 10^7 size, and this don't give MLE.
To make a good sieve think about that an almost odd prime number have only an odd prime factor.
by Emilio
Wed Dec 21, 2005 2:49 pm
Forum: C++
Topic: set_intersection STL, help please!
Replies: 2
Views: 1640

Thanks Krzysztof!

I didn't know iterator header.
by Emilio
Wed Dec 21, 2005 5:11 am
Forum: C++
Topic: set_intersection STL, help please!
Replies: 2
Views: 1640

set_intersection STL, help please!

Hello there! I'm trying intersect two STL sets but I can't achieve it. In the next code I show how I'm trying it, I want the intersection of set1 and set2. How can get it in another set(set3 in code)? Any example will be highly-regarded! I have tried other examples, for example http://www.sgi.com/te...
by Emilio
Sun Dec 18, 2005 7:09 pm
Forum: Volume 109 (10900-10999)
Topic: 10914 - Abundance and Perfect Numbers
Replies: 20
Views: 8503

helloneo wrote: anybody would tell me how to get "almost odd prime numbers" up to 1000000 fast..? I use a kind of sieve to get all "almost odd prime numbers" up to 10000000. Then I precalculate the sum (to speed this I precalculate all divisors of all power of two in the rank [1..10000000]), then bi...
by Emilio
Sat Dec 10, 2005 5:26 am
Forum: Volume 100 (10000-10099)
Topic: 10040 - Ouroboros Snake
Replies: 20
Views: 4487

Hello there! I'm trying this problem but I get WA. I have solved problem 10506 and use the same backtracking algorithm. Maybe I don't understand the problem specification or something. By this reason if anyone can say me the output for these test cases maybe I will realize my trouble. Input: 47 1 0 ...
by Emilio
Wed Dec 07, 2005 3:43 am
Forum: Other words
Topic: New ranklist format for each problem
Replies: 31
Views: 9760

Please, the old format! :(
I love watch the ranklist!
by Emilio
Thu Dec 01, 2005 6:08 pm
Forum: Volume 109 (10900-10999)
Topic: 10975 - Dueue's Quiz
Replies: 39
Views: 16539

Thanks Cho!

But I don't know why doesn't work with cin.
Now I have got MLE, I used trie. Well, this is another task, now I can think about other stuffs in this problem. :D
by Emilio
Thu Dec 01, 2005 2:43 am
Forum: Volume 109 (10900-10999)
Topic: 10975 - Dueue's Quiz
Replies: 39
Views: 16539

To Moha: Ok! The matrix m*n chars? I think m*(n+1) with '\n', or do you refer to valid chars only(lower case)? And how do you read the rest of the input? for ints -> scanf, cin, char by char? for the words -> scanf, cin, char by char? The size of your matrix is 101x101? Thanks a lot of, in advance! ...
by Emilio
Wed Nov 30, 2005 10:20 pm
Forum: Volume 109 (10900-10999)
Topic: 10975 - Dueue's Quiz
Replies: 39
Views: 16539

Hello all! I was getting strange WAs, and then decided to make some input checkers. In the next lines I expose these input checkers and what are the OJ's replies. input_checker_1 int main () { int T, D, Q, M, N, i, j, k; char s[2005]; cin >> T; assert(T>=1 && T<=10); for (k=1; k<=T; k++) { cin >> D;...
by Emilio
Sun Nov 27, 2005 6:43 pm
Forum: Volume 109 (10900-10999)
Topic: 10968 - KuPellaKeS
Replies: 8
Views: 4204

Thanks helloneo!

I got AC. My approach was wrong!
by Emilio
Sun Nov 27, 2005 1:08 am
Forum: Volume 109 (10900-10999)
Topic: 10968 - KuPellaKeS
Replies: 8
Views: 4204

Hello there! Could anyone say me if my output is correct for this input? input: 4 5 1 2 2 3 3 4 4 1 1 3 2 1 1 2 5 8 1 2 2 3 3 4 4 1 1 3 2 4 1 5 2 5 100 0 6 8 1 2 1 4 1 6 2 3 2 4 2 5 3 5 3 6 4 4 1 2 2 3 3 4 4 1 5 6 1 2 1 5 2 5 2 3 3 4 4 5 2 2 1 2 2 1 4 3 1 2 2 3 3 4 1 0 7 9 1 2 2 3 3 4 4 2 2 5 1 5 5 ...
by Emilio
Wed Nov 23, 2005 3:16 am
Forum: Volume 109 (10900-10999)
Topic: 10941 - Words adjustment
Replies: 19
Views: 6148

Hi there!
Only one thing. The problem specification says that the maximum size of the input is 1000, well, I was getting WA until I changed the size of my arrays to 2005 for k and for the words size.
Only that!

See you!
by Emilio
Tue Nov 08, 2005 7:10 pm
Forum: Volume 109 (10900-10999)
Topic: 10949 - Kids in a Grid
Replies: 30
Views: 11883

Thanks another time wook! I have sent my code with a similar parse input method as yours, and now seem that works fine. Albuit I don't understand why my parse input method don't work. By other hand I'm getting TLE, but this is another task :wink: . I'll try with some algorithm of your recommended pa...
by Emilio
Tue Nov 08, 2005 1:41 am
Forum: Volume 109 (10900-10999)
Topic: 10949 - Kids in a Grid
Replies: 30
Views: 11883

Thanks wook! But your case is considered in my parse input method. Sorry but have posted my code. I'm getting RE and can't find any bug. Could you say me if my parse input method is wrong? struct stmv {int x,y;}; stmv movs[256]; char s1[30000], s2[30000], s[30000], m[30][30]; main () { int x, y, H, ...

Go to advanced search