Search found 20 matches

by renatov
Wed Mar 06, 2013 3:22 am
Forum: General
Topic: Python?
Replies: 1
Views: 6273

Python?

Is there a way to subimit a code in Python? And if not, is there any site like UVA that accepts python codes?
by renatov
Mon Oct 08, 2012 2:28 am
Forum: Volume 105 (10500-10599)
Topic: 10523 - Very Easy !!!
Replies: 63
Views: 22653

Re: 10523 - Very Easy

brianfry713 wrote:It probably won't be precise enough using double.
Yeah, that's exaclty the case. I tested with the values on "Algorithmist" wiki and using 'double' as variable type it will not be precisely enough.
by renatov
Fri Oct 05, 2012 8:13 pm
Forum: Volume 105 (10500-10599)
Topic: 10523 - Very Easy !!!
Replies: 63
Views: 22653

Re: 10523 - Very Easy

Does it work if I use "double" as variable types? I don't know how to use this BigNum thing yet, I'm still learning C and I just want to practice.
by renatov
Tue Oct 02, 2012 9:36 am
Forum: Volume 114 (11400-11499)
Topic: 11479 - Is this the easiest problem?
Replies: 48
Views: 17643

Re: 11479 - Is this the Easiest Problem?

UVA's g++ and gcc have int=32 bits, long=64 bits, long long=64 bits. The reason int doesn't work for this problem is if you try and add or subtract 32-bit signed int's you may get overflow. You are right. I compiled a simple program to test C data type under Linux, with GCC 4.4.5-8, and here is the...
by renatov
Tue Oct 02, 2012 8:07 am
Forum: Volume 114 (11400-11499)
Topic: 11479 - Is this the easiest problem?
Replies: 48
Views: 17643

Re: 11479 - Is this the Easiest Problem?

To check if the sides form a triangle, you should performe 2 tests:

1. See if every input is greater than zero
2. | b - c | < a < b + c
by renatov
Tue Oct 02, 2012 1:39 am
Forum: C
Topic: Compiling with MINGW
Replies: 8
Views: 3593

Re: Compiling with MINGW

I compiled it under Debian Linux and it worked just fine, thanks. But when I'm in Windows, I might use Mingw. If I need lcrypt in the future, I'll try to install it.
by renatov
Sat Sep 29, 2012 7:58 am
Forum: C
Topic: "long long int" and "unsigned long long int"
Replies: 1
Views: 2627

Re: "long long int" and "unsigned long long int"

I think in Windows the specifier for long long int is %I64d and for unsigned long long int is %I64u . This is the code and its output in Windows: #include <stdio.h> #include <limits.h> int main() { /* header */ fprintf(stdout, "%22s | %8s | %7s | %4s | %19s | %20s\n", "DATA TYPE", "printf()", "scanf...
by renatov
Sat Sep 29, 2012 6:54 am
Forum: Volume 114 (11400-11499)
Topic: 11479 - Is this the easiest problem?
Replies: 48
Views: 17643

Re: 11479 - Is this the Easiest Problem?

Use long long instead of int. You are right, I've just got an "Accepted" when I changed int to long long . I tested if I could have declared just as long , and I got accepted too. So, it doesn't have to be long long , it can be just long . It seems that UVA's gcc specifies 16 bits for int declarati...
by renatov
Fri Sep 28, 2012 9:58 pm
Forum: C
Topic: Compiling with MINGW
Replies: 8
Views: 3593

Re: Compiling with MINGW

brianfry713 wrote:Cygwin is another option.
Thanks, but Cygwin has the same error about lcrypt.
by renatov
Fri Sep 28, 2012 8:45 pm
Forum: C
Topic: "long long int" and "unsigned long long int"
Replies: 1
Views: 2627

"long long int" and "unsigned long long int"

Question: how to input/output " long long int " and " unsigned long long int " data in a portable way using C language? I'm currently compiling in Windows XP with Mingw and I'm trying to use %lld and %llu . Here are the code and its output: #include <stdio.h> #include <limits.h> int main() { /* hea...
by renatov
Fri Sep 28, 2012 8:22 pm
Forum: Volume 100 (10000-10099)
Topic: 10055 - Hashmat the Brave Warrior
Replies: 166
Views: 46205

Re: 10055 - Hashmat the Brave Warrior

It's working now, thanks!


ps: %lld didn't work on Windows (I had to use %I64d to test), but it worked for UVA's gcc.
by renatov
Fri Sep 28, 2012 8:48 am
Forum: General
Topic: Is UVA site offline?
Replies: 3
Views: 8566

Re: Is UVA site offline?

I cleared my cookies and now the site is working again, thanks!
by renatov
Fri Sep 28, 2012 8:46 am
Forum: C
Topic: Compiling with MINGW
Replies: 8
Views: 3593

Re: Compiling with MINGW

I guess I don't need it then, for now. But what if I need this one day? Is there a way to implement it in Mingw?
by renatov
Thu Sep 27, 2012 5:27 pm
Forum: General
Topic: Is UVA site offline?
Replies: 3
Views: 8566

Is UVA site offline?

Whenever I try to access http://uva.onlinejudge.org/index.php I receive this error:

Erro 310 (net::ERR_TOO_MANY_REDIRECTS)

Is the site offline or is it happening only here?
by renatov
Thu Sep 27, 2012 8:36 am
Forum: C
Topic: Compiling with MINGW
Replies: 8
Views: 3593

Re: Compiling with MINGW

brianfry713 wrote:Do you need the crypt library? If not don't use -lcrypt.
I don't know if I do... what is it for?

Go to advanced search