Search found 22 matches

by tRipper
Wed Dec 14, 2005 10:52 pm
Forum: Off topic (General chit-chat)
Topic: A spam or something?
Replies: 13
Views: 4734

really strange... Hello, My name is Ann, and I live in Riga, Latvia. For my exam I need to solve problems form website:http://acm.uva.es I have already solved problems but still have hard problems for me. If I will not solve them, I will not be allowed to pass this exam :-( It seems, you could help ...
by tRipper
Sun Nov 13, 2005 11:29 am
Forum: Volume 109 (10900-10999)
Topic: 10962 - Don Giovanni's Last Dinner
Replies: 15
Views: 5666

The same situation with me. Please reply...
by tRipper
Mon Nov 07, 2005 7:59 pm
Forum: Volume 107 (10700-10799)
Topic: 10706 - Number Sequence
Replies: 34
Views: 13773

What's the output for the following input?

Code: Select all

3
2147483647
9045
123456789
My program (WA) gives

Code: Select all

2
9
3
by tRipper
Tue Nov 01, 2005 7:56 pm
Forum: Volume 1 (100-199)
Topic: 164 - String Computer
Replies: 120
Views: 10538

Thank you very much..
I completley forgot that comparation and concetation of strings don't take O(1) time.
A stupid mistake.
by tRipper
Tue Nov 01, 2005 7:12 pm
Forum: Volume 1 (100-199)
Topic: 164 - String Computer
Replies: 120
Views: 10538

This problem is driving me mad too! This time i get TLE, and I really can't find a rational explanation for it. Can somebody help me? #include <iostream> #include <string> using namespace std; string prva,druga; int init() { string red; if (!getline(cin,red)) return 0; prva=""; druga=""; if (red[0]=...
by tRipper
Mon Sep 26, 2005 9:02 pm
Forum: Volume 108 (10800-10899)
Topic: 10898 - Combo Deal
Replies: 9
Views: 6006

You are right, thanks. I don't read problem statements carefully enough. AC now
by tRipper
Sun Sep 25, 2005 10:03 pm
Forum: Volume 108 (10800-10899)
Topic: 10802 - Lex Smallest Drive
Replies: 36
Views: 14422

0 3 1 2 3 0 3 1 2 3 0 3 1 2 3 0 4
Your drive is invalid because of the sequence 3 0 3
by tRipper
Sun Sep 25, 2005 5:35 pm
Forum: Volume 108 (10800-10899)
Topic: 10895 - Matrix Transpose
Replies: 17
Views: 4817

10895 - Matrix Transpose

I dont understand this sentence in problem descreption:
You are given several sparse matrix in a row, each of them described as follows.
Does it mean there are more than one matrices or just one?
by tRipper
Sun Sep 25, 2005 11:42 am
Forum: Volume 108 (10800-10899)
Topic: 10898 - Combo Deal
Replies: 9
Views: 6006

I don't really think this is a hard problem. I've tried both bottom-up approach and memoization but the result is the same - WA. I just don't see the reason why.. Is there any tricky input?
Here's my source: a straightforward memoization

Code: Select all

    cut after AC
by tRipper
Wed Jul 06, 2005 11:23 pm
Forum: Volume 106 (10600-10699)
Topic: 10618 - Tango Tango Insurrection
Replies: 0
Views: 1435

10618 - Tango Tango Insurrection

I'm trying to solve it using DP. I have a array best[71][6] in wich I store the lowest possible energy cost - first index shows the sign I'm currently on, and the second index shows my last move. Moves are numbered: 0 for left foot on Left 1 for left foot on Up 2 for left foot on Down 3 for right fo...
by tRipper
Wed Jul 06, 2005 7:14 pm
Forum: Volume 101 (10100-10199)
Topic: 10150 - Doublets
Replies: 46
Views: 16306

I'm really having trouble with this problem. Can someone tell me why this code gives WA? Basically i use STL set to store all the words and after that BFS to find the solution. #include <iostream> #include <set> #include <string> using namespace std; set <string> dict; string red,start,end; void sol...
by tRipper
Mon Jul 04, 2005 12:04 am
Forum: Volume 105 (10500-10599)
Topic: 10508 - Word Morphing
Replies: 35
Views: 11860

There's a O(nm) algorithm.
You are right. I greatly underestimated this problem. Thanks.
AC now.
by tRipper
Sun Jul 03, 2005 6:28 pm
Forum: Volume 105 (10500-10599)
Topic: 10508 - Word Morphing
Replies: 35
Views: 11860

If the number of words and the number of letters are both higher than 1000, how is it possible to solve this problem with brute force and checking words letter by letter? Time complexity is then O(n^3) which is (when n=1000) definetly too large to pass the time limit.
by tRipper
Mon Jun 27, 2005 2:03 pm
Forum: Volume 108 (10800-10899)
Topic: 10841 - Lift Hopping in the Real World
Replies: 9
Views: 5997

Can someone give me some I/O. Here's mine test data: INPUT: 2 30 10 5 0 1 3 5 7 9 11 13 15 20 99 4 13 15 19 20 25 30 3 50 10 50 100 0 10 30 40 0 20 30 0 20 50 5 1 1 2 3 4 50 0 2 6 2 3 5 3 8 1 8 20 0 1 5 1 1 2 3 4 100 0 2 6 2 3 5 3 8 1 8 20 0 1 5 0 1 2 3 4 50 0 2 6 2 3 5 3 8 1 8 20 0 1 OUTPUT: 1295 ...
by tRipper
Mon Jun 27, 2005 1:33 pm
Forum: Volume 108 (10800-10899)
Topic: 10811 - Up the Ante
Replies: 20
Views: 5485

Thanx misof, i found my bug. AC now...

Go to advanced search