Search found 20 matches

by renatov
Sun Sep 23, 2012 6:20 pm
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 179926

Re: If you get WA in problem 100, read me before post!

Here is a tip: in C, use long int for the main variable types and test these inputs/outputs:

Code: Select all

1 10
100 200
201 210
900 1000
1000 900
999999 999990

1 10 20
100 200 125
201 210 89
900 1000 174
1000 900 174
999999 999990 259
by renatov
Sat Sep 22, 2012 10:02 pm
Forum: C
Topic: Compiling with MINGW
Replies: 8
Views: 3514

Compiling with MINGW

I'm trying to compile a source code with MINGW, with the options that UVA uses: gcc FILE.c -o FILE.exe -lm -lcrypt -O2 -pipe -ansi -DONLINE_JUDGE But I receive this error: (...) ld.exe: cannot find -lcrypt collect2: ld returned 1 exit status Does someone know what does this mean and how to fix it?
by renatov
Sat Sep 22, 2012 8:37 pm
Forum: Volume 4 (400-499)
Topic: 440 - Eeny Meeny Moo
Replies: 18
Views: 1745

Re: 440 - Eeny Meeny Moo

For example, N = 10, M = 3, considering "1" as the first selected city:

Code: Select all

1	2	3	4	5	6	7	8	9	10
2	3	4	5	6	7	8	9	10	
2	3	5	6	7	8	9	10		
2	3	5	6	8	9	10			
2	3	5	6	8	9				
2	3	6	8	9					
2	3	6	8						
2	3	8							
2	8								
2
by renatov
Sat Sep 22, 2012 12:04 am
Forum: Volume 100 (10000-10099)
Topic: 10055 - Hashmat the Brave Warrior
Replies: 166
Views: 45515

Re: 10055 - Hashmat the Brave Warrior

Use long long. I changed to long long and it doesn't work either, although it works perfectly in my computer. Could somebody help me, please? Here is the code: #include <stdio.h> int main() { long long int lldMenor; long long int lldMaior; while( scanf("%lld %lld", &lldMenor, &lldMaior) != EOF ) pr...
by renatov
Fri Sep 21, 2012 6:41 am
Forum: Volume 100 (10000-10099)
Topic: 10055 - Hashmat the Brave Warrior
Replies: 166
Views: 45515

Re: 10055 - Hashmat the Brave Warrior

Hey guys, I'm receiving a "Wrong Answer" when I submit, but the program is running just fine in Code Blocks (WinXP). I can even input 2^32 (4294967296) and everything still works. Could someone please help?

Code: Select all

accepted;

ps: just use "long long".

Go to advanced search