Search found 57 matches

by pavelph
Sat Jan 01, 2005 6:44 pm
Forum: C++
Topic: Compilation Error on C++ and Accepted on C
Replies: 1
Views: 2092

Compilation Error on C++ and Accepted on C

I recently started to use C/C++ and as I know most of programs that work on C also work on C++ (at least compile). Maybe you can tell me what in this program can produce CE on C++(I use Visual C++ 6 and all work). //This is problem 10714 //It's AC on C and Compilation Error on C++ (why??) #include <...
by pavelph
Mon Jun 21, 2004 11:23 pm
Forum: Volume 104 (10400-10499)
Topic: 10424 - Love Calculator
Replies: 137
Views: 55545

Sorry, I didn't read you code. But today I get accepted for this problem after some WAs. My mistake was that program hadn't worked with words like

Code: Select all

@@
123
- sum of their "characters" is 0 and you must to find 0/0.
Realy in this case you should output clear line.
by pavelph
Mon Jun 21, 2004 5:33 pm
Forum: Pascal
Topic: Modules
Replies: 1
Views: 5454

Modules

Can I use special modules in UVA problems ( for example : uses Math, SysUtils ).
by pavelph
Thu Apr 08, 2004 5:56 pm
Forum: Volume 102 (10200-10299)
Topic: 10242 - Fourth Point !!
Replies: 30
Views: 16218

10242 - Fourth point of parallelogram

I can`t understand why I get RTE. This is problem 10242 about parallelogram. [pascal]{$N+} program acm10242; {Fourth point of parallelogram} var i, j, ii, jj, n, same1, same2: integer; x, y: array [1..4] of double; v: array [1..4] of integer; x1, y1: double; procedure similar; {find 2 similar points...
by pavelph
Mon Mar 01, 2004 2:58 pm
Forum: Algorithms
Topic: can any body inform me the best prime generating algorithm ?
Replies: 17
Views: 7524

Do you know about the Seat of Eratosphean???
by pavelph
Mon Mar 01, 2004 2:56 pm
Forum: Volume 106 (10600-10699)
Topic: 10622 - Perfect P-th Powers
Replies: 47
Views: 29311

And what answers for 1 or (-1) or 0 ???
My prog work on all inputs but WA :(
by pavelph
Thu Feb 05, 2004 4:32 pm
Forum: Volume 1 (100-199)
Topic: 122 - Trees on the level
Replies: 103
Views: 20548

I changed const kolichestvo to 100000. But also WA :cry:
Maybe else mistke ... :oops:
by pavelph
Tue Feb 03, 2004 5:30 pm
Forum: Volume 3 (300-399)
Topic: 382 - Perfection
Replies: 95
Views: 31813

No, my AC code contain line
[pascal] if (n=1) then writeln(n:5, ' DEFICIENT') [/pascal]
Judge suppose that you must to count only divisors that <n. And for 1 the sum of divisors will be 0. Ofcourse it DEFICIENT. :wink:
by pavelph
Tue Feb 03, 2004 5:21 pm
Forum: Volume 3 (300-399)
Topic: 382 - Perfection
Replies: 95
Views: 31813

I don't know C but I know that very often mistake for this problem that 1 is DEFICIENT. Check it please.
Best regards. :)
by pavelph
Mon Feb 02, 2004 6:06 pm
Forum: Volume 3 (300-399)
Topic: 386 - Perfect Cubes
Replies: 53
Views: 14733

First outputs for this problem: [pascal]program acm386; {a^3=b^3+c^3+d^3} begin writeln('Cube = 6, Triple = (3,4,5)'); writeln('Cube = 12, Triple = (6,8,10)'); writeln('Cube = 18, Triple = (2,12,16)'); writeln('Cube = 18, Triple = (9,12,15)'); writeln('Cube = 19, Triple = (3,10,18)'); writeln('Cube ...
by pavelph
Mon Feb 02, 2004 8:16 am
Forum: Volume 105 (10500-10599)
Topic: 10515 - Powers Et Al.
Replies: 124
Views: 41544

Question about double.

Hi! I have program that give me right output for input from osan.
But judge give me WA.
One question: can I read m and n in double variable or I must to read it as string (m, n<10^101) ?
by pavelph
Sun Feb 01, 2004 10:55 pm
Forum: Volume 3 (300-399)
Topic: 374 - Big Mod
Replies: 79
Views: 21769

WA :(((

(m*m*m)mod p=(m mod p * m mod p)mod p I think you wanted to say that (m*m) mod p = (m mod p * m mod p) mod p :wink: I also as can't get AC for this problem. But my prog work on all my inputs. But I don't know what output must be for (0, 0, m) :-? My algorithm have this steps: 1) create mods: array ...
by pavelph
Sun Feb 01, 2004 4:23 pm
Forum: Volume 5 (500-599)
Topic: 572 - Oil Deposits
Replies: 39
Views: 21350

Thank you, little joey. It was realy silly mistake.
Now I`ve got AC :)
by pavelph
Sat Jan 31, 2004 11:06 pm
Forum: Volume 5 (500-599)
Topic: 572 - Oil Deposits
Replies: 39
Views: 21350

Thank you. As I understand you, my prog work like you say. Maybe I realy have some bug. But it is very hard to find it becouse program works well on all my inputs :oops:
by pavelph
Sat Jan 31, 2004 10:57 pm
Forum: Volume 100 (10000-10099)
Topic: 10038 - Jolly Jumpers
Replies: 445
Views: 143555

Sorry, I know java very and very bad. All that I can help you is my algo: 1) read input to array a[1..n] of integer 2) create other array b[1..n] of boolean for i=1 to n-1 do if |a[i] - a[i+1]|>=n then /Not jolly/ else b[|a[i] - a[i+1]|]:=true for i=1 to n-1 if not b[i] then /Not jolly/ else {if b[i...

Go to advanced search