Search found 11 matches

by Dani Rodrigo
Sun Feb 11, 2007 3:03 pm
Forum: Volume 109 (10900-10999)
Topic: 10950 - Bad Code
Replies: 19
Views: 10698

A code may or may not be preceded by a 0 in the encrypted string
but not can be ended with a code make of zeros.
Try this I/O:

Input:

Code: Select all

2
a 1
b 10
10
0
Output:

Code: Select all

Case #1
b
Note that the solution "a" is wrong because ends with a code of zeros.
by Dani Rodrigo
Tue Aug 01, 2006 11:37 pm
Forum: Volume 108 (10800-10899)
Topic: 10895 - Matrix Transpose
Replies: 17
Views: 5286

Re: 10895 - Matrix Transpose

tRipper wrote: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?
It means that there are more than one matrix.
by Dani Rodrigo
Mon Apr 17, 2006 3:45 am
Forum: Volume 2 (200-299)
Topic: 215 - Spreadsheet Calculator
Replies: 8
Views: 3055

215 WA?? (need solution for this input)

Hello! I've received WA many times. :cry: :cry: Anyone could write the correct output for this input, please. The first case is problematic. Obviosly the result is 0, but it involucrates the same cell. Which is the correct interpretation? 1 1 A0-A0 4 4 A1-A2+A3 A2 A3 6+B1 A3 5+7-8 6+A3-A2 B2+7-15+B1...
by Dani Rodrigo
Wed Mar 15, 2006 1:28 am
Forum: Bugs and suggestions
Topic: 511 - Do You Know the Way to San Jose? - Do nothing AC
Replies: 62
Views: 5315

Code: Select all

while(i<l && s[i]==old[i]) i++; //<<-- problematic line! 
a[ old[i]-'A' ][ s[i]-'A' ] = 1; 
If you exit the while because i=l; then old or s has the value '\0'.
When you try to access to a[ old-'A' ][ s-'A' ] you get RE.
In the second code you verify that old!='\0' and s!='\0'
by Dani Rodrigo
Fri Jan 21, 2005 2:38 am
Forum: Volume 104 (10400-10499)
Topic: 10432 - Polygon Inside A Circle
Replies: 62
Views: 20679

I received WA many times. I don't know the reason, but finally I read numbers as doubles and got AC.
by Dani Rodrigo
Sun Dec 12, 2004 3:00 am
Forum: Volume 104 (10400-10499)
Topic: 10424 - Love Calculator
Replies: 137
Views: 40516

Hi,
I received many times WA because I use to read scanf ("%s",a) to get the names. This have a problem, when it finds a space, it stops reading.
Finally I got AC usint scanf ("%[^\n]");
by Dani Rodrigo
Wed Aug 18, 2004 1:06 am
Forum: Volume 4 (400-499)
Topic: 444 - Encoder and Decoder
Replies: 155
Views: 22822

Be carefully when if you declare an array to save the numbers. The size of this array must be at least 300!! (because there are a maximum of 100 characters).
I made this error and get WA to many times. :D

Bye.
by Dani Rodrigo
Thu Aug 05, 2004 11:29 pm
Forum: Volume 4 (400-499)
Topic: 485 - Pascal's Triangle of Death
Replies: 50
Views: 5313

Finally I got ACC using strings, thanks for your post :P
by Dani Rodrigo
Thu Aug 05, 2004 7:09 pm
Forum: Volume 4 (400-499)
Topic: 485 - Pascal's Triangle of Death
Replies: 50
Views: 5313

Thank you, UFP! I'm going try to solve it using strings.
by Dani Rodrigo
Thu Aug 05, 2004 1:32 am
Forum: Volume 4 (400-499)
Topic: 485 - Pascal's Triangle of Death
Replies: 50
Views: 5313

485 - Pascal's Triangle WA!!

I don't find the mistake of my program. It output all the rows until row 204 (this row included, row 204 is the first which contain a number bigger tha 10^60). This is my code: #include <stdio.h> void main () { double antiguos[300], nuevos[300], cota; int i, lon, chivato=0; cota=1; for (i=0; i<60; i...
by Dani Rodrigo
Thu Aug 05, 2004 12:18 am
Forum: Volume 4 (400-499)
Topic: 408 - Uniform Generator
Replies: 48
Views: 4439

408 - why wrong answer?

I think that I that a choice is a "Good Choice" if, and only if, gcd(mod,step)==1. Is this correct? Help plezz Here is my code: #include <stdio.h> int mcd (int x, int y) { int residuo, aux; if (y>x) { aux=x; x=y; y=aux; } while ( residuo!=0 ) { residuo = x % y; x = y; y = residuo; } return (x); } vo...

Go to advanced search