Search found 20 matches
Python?
Is there a way to subimit a code in Python? And if not, is there any site like UVA that accepts python codes?
- Mon Oct 08, 2012 2:28 am
- Forum: Volume 105 (10500-10599)
- Topic: 10523 - Very Easy !!!
- Replies: 63
- Views: 32558
Re: 10523 - Very Easy
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.brianfry713 wrote:It probably won't be precise enough using double.
- Fri Oct 05, 2012 8:13 pm
- Forum: Volume 105 (10500-10599)
- Topic: 10523 - Very Easy !!!
- Replies: 63
- Views: 32558
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.
- Tue Oct 02, 2012 9:36 am
- Forum: Volume 114 (11400-11499)
- Topic: 11479 - Is this the easiest problem?
- Replies: 48
- Views: 27541
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 ...
You are right. I compiled a simple program to test C data type under Linux, with GCC 4.4.5-8, and here is ...
- Tue Oct 02, 2012 8:07 am
- Forum: Volume 114 (11400-11499)
- Topic: 11479 - Is this the easiest problem?
- Replies: 48
- Views: 27541
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
1. See if every input is greater than zero
2. | b - c | < a < b + c
- Tue Oct 02, 2012 1:39 am
- Forum: C
- Topic: Compiling with MINGW
- Replies: 8
- Views: 5690
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.
- Sat Sep 29, 2012 7:58 am
- Forum: C
- Topic: "long long int" and "unsigned long long int"
- Replies: 1
- Views: 4145
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 ...
#include <stdio.h>
#include <limits.h>
int main()
{
/* header */
fprintf(stdout, "%22s | %8s | %7s | %4s | %19s | %20s\n", "DATA TYPE", "printf ...
- Sat Sep 29, 2012 6:54 am
- Forum: Volume 114 (11400-11499)
- Topic: 11479 - Is this the easiest problem?
- Replies: 48
- Views: 27541
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 ...
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 ...
- Fri Sep 28, 2012 9:58 pm
- Forum: C
- Topic: Compiling with MINGW
- Replies: 8
- Views: 5690
Re: Compiling with MINGW
Thanks, but Cygwin has the same error about lcrypt.brianfry713 wrote:Cygwin is another option.
- Fri Sep 28, 2012 8:45 pm
- Forum: C
- Topic: "long long int" and "unsigned long long int"
- Replies: 1
- Views: 4145
"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 ...
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 ...
- Fri Sep 28, 2012 8:22 pm
- Forum: Volume 100 (10000-10099)
- Topic: 10055 - Hashmat the Brave Warrior
- Replies: 166
- Views: 77829
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.
ps: %lld didn't work on Windows (I had to use %I64d to test), but it worked for UVA's gcc.
- Fri Sep 28, 2012 8:48 am
- Forum: General
- Topic: Is UVA site offline?
- Replies: 3
- Views: 10766
Re: Is UVA site offline?
I cleared my cookies and now the site is working again, thanks!
- Fri Sep 28, 2012 8:46 am
- Forum: C
- Topic: Compiling with MINGW
- Replies: 8
- Views: 5690
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?
- Thu Sep 27, 2012 5:27 pm
- Forum: General
- Topic: Is UVA site offline?
- Replies: 3
- Views: 10766
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?
Erro 310 (net::ERR_TOO_MANY_REDIRECTS)
Is the site offline or is it happening only here?
- Thu Sep 27, 2012 8:36 am
- Forum: C
- Topic: Compiling with MINGW
- Replies: 8
- Views: 5690
Re: Compiling with MINGW
I don't know if I do... what is it for?brianfry713 wrote:Do you need the crypt library? If not don't use -lcrypt.