## Search found 57 matches

Sat Jan 10, 2004 11:48 am
Forum: Volume 102 (10200-10299)
Topic: 10252 - Common Permutation
Replies: 150
Views: 51966

Given two strings of lowercase letters ...
Hope it helps you
Fri Jan 02, 2004 9:00 pm
Forum: Volume 102 (10200-10299)
Topic: 10242 - Fourth Point !!
Replies: 30
Views: 12256

### I`m confused...

I don`t know why it gets me Runtime Error. [pascal]{\$N+} var i, j, ii, jj, n: integer; x, y: array [1..4] of double; v: array [1..4] of integer; x1, y1: double; procedure similar; {find 2 similar points} begin {i & j - numbers of this points} i:=1; while i<4 do begin j:=i+1; while j<=4 do begin if (...
Fri Jan 02, 2004 7:43 pm
Forum: Volume 1 (100-199)
Topic: 113 - Power of Cryptography
Replies: 162
Views: 16332
1<=p<10^101
I think that double not support so big numbers.
Fri Jan 02, 2004 4:01 pm
Forum: Volume 4 (400-499)
Topic: 439 - Knight Moves
Replies: 33
Views: 11106
Sorry, I don`t know special inputs for this problem. But I can see your code and will try to find mistake. One problem: I know only Pascal
And if your program in another source I can`t check it. But maybe somebode else will help you.
Fri Jan 02, 2004 12:40 pm
Forum: Volume 4 (400-499)
Topic: 439 - Knight Moves
Replies: 33
Views: 11106

### You are right!

My AC program get me answers like your.
Fri Jan 02, 2004 12:02 pm
Forum: Volume 3 (300-399)
Topic: 325 - Identifying Legal Pascal Real Constants
Replies: 63
Views: 15099

### THANKS

Thank you very much!!!
Now I got ACCEPTED
Also thank to Sanya and Aleksandrs Saveljevs.
All that you said was very helpful for me.
Fri Jan 02, 2004 1:31 am
Forum: Volume 2 (200-299)
Topic: 216 - Getting in Line
Replies: 57
Views: 24691

### AC!

Thank you.
I`m found my mistake: I didn`t understood condition of problem. I thougth that first computer fixed.
Now I got AC!!! Thanks.
Fri Jan 02, 2004 1:10 am
Forum: Volume 103 (10300-10399)
Topic: 10394 - Twin Primes
Replies: 101
Views: 32589

### HOW DO IT FASTER?

I read all posts about this problem but can`t uderstand how I can optimize my program. It`s work very slow... [pascal] program acm10394; {Twince Prime Numbers} {type integer = longint;} const maxn = 4500; koltw = 100000; var ck : array[1 .. maxn] of boolean; list : array[1 .. 700] of integer; tw : a...
Thu Jan 01, 2004 7:36 pm
Forum: Off topic (General chit-chat)
Topic: How often do you use the board?
Replies: 3
Views: 2169
I visit forums two-four times a day, because I`m on uva only 2 months and have many questions. This board is very helpful for me.
Thu Jan 01, 2004 6:35 pm
Forum: Volume 102 (10200-10299)
Topic: 10299 - Relatives
Replies: 57
Views: 14310

### Euler`s Function

First of all this is math problem.
f(n) - number of positive integers less than n are relatively prime to n.
This is Euler`s Function.
If n=(p1^a1)*(p2^a2)*...*(pk^ak) where p1, ..., pk - prime numbers than f(n)=n*(1-1/p1)*(1-1/p2)*...*(1-1/pk) .
Wed Dec 31, 2003 6:20 pm
Forum: Volume 7 (700-799)
Topic: 729 - The Hamming Distance Problem
Replies: 54
Views: 15656

### :)

Hi!
I also had this problem, but when I change
[pascal]
for i:= 1 to n do write(a);
writeln;
writeln;
[/pascal]
to
[pascal]
var s: string;
...
s:='';
for i:=1 to n do s:=s+chr( a + 48 );
writeln(s);
if qual<quality then writeln;[/pascal]
And I`ve got AC(not PE) in 1 sec
Tue Dec 30, 2003 9:53 pm
Forum: Volume 100 (10000-10099)
Topic: 10013 - Super long sums
Replies: 212
Views: 40372

### Hm...

You have to find the sum of two numbers with maximal size of 1.000.000 digits.
I think your code can`t solve numbers that have 1000000 digits. Isn`t it?
Tue Dec 30, 2003 1:54 pm
Forum: Volume 4 (400-499)
Topic: 485 - Pascal's Triangle of Death
Replies: 50
Views: 4970

### Need help with 485 - Pascal`s Triangle

I solved this problem, but maybe wrong
So my first number that > 10^60 is

Code: Select all

``102915295372100842754347681194716375353377979378184088366400 ``
Is it true? Help me please.
Sun Dec 28, 2003 8:08 pm
Forum: Volume 3 (300-399)
Topic: 325 - Identifying Legal Pascal Real Constants
Replies: 63
Views: 15099
:evil: My prog for all inputs give me absolutly right outputs. And what is wrong????? HELP ME PLEASE!!! [pascal] program acm325; var n: byte; s, l, i: string; f: boolean; begin l:=' is legal.'; i:=' is illegal.'; s:='a'; while true do begin readln(s); if s[1]='*' then break; while s[1]=' ' do delete...
Mon Dec 22, 2003 6:18 pm
Forum: Volume 2 (200-299)
Topic: 216 - Getting in Line
Replies: 57
Views: 24691

### ???

I read on the list of problems that 216 has Special Judge. What does it mean? Here my code, that works on all inputs, but getting me WA.
[pascal]{CODE CUT}[/pascal]