## Search found 27 matches

Thu Mar 11, 2004 10:52 pm
Forum: Volume 1 (100-199)
Topic: 104 - Arbitrage
Replies: 223
Views: 15521
what reasult should be for that ??
4
1 1.01 1
1 1 1
1 1 1
1 1 1

my prog write:
1 3 1 3 1

is this right ??
Thu Mar 11, 2004 7:34 am
Forum: Volume 1 (100-199)
Topic: 104 - Arbitrage
Replies: 223
Views: 15521
thx for reply. 1) i change code i now have: [cpp] const double EPS=1e-6; ... while ((arbit_tmp-1.01<=EPS) && (ilosc_wymian<=size)) /*limit arbitrage lenght and do check for cycles: when 1<arbitrage<=1.01 */ { arbit_tmp*=arbit; ilosc_wymian+=nr; } if ((arbit_tmp-1.01>EPS) && (ilosc_wymian<=size)) /*l...
Wed Mar 10, 2004 8:02 pm
Forum: Volume 1 (100-199)
Topic: 104 - Arbitrage
Replies: 223
Views: 15521

### 104 - Arbitrage (allways WA)

plz help :). i created quite complicated algorithm for this problem. its works in O(n^4). im sure its good, but i got WA. i was trying change floating size (float,double,long double,long long double) but it is'nt help. if you have some test cases plz show it (i tryed forum's cases) or show something...
Mon Mar 08, 2004 11:25 pm
Forum: Volume 1 (100-199)
Topic: 138 - Street Numbers
Replies: 93
Views: 7922
Yes i know that . but try send this to OJ, in 0,004s is WA.
Mon Mar 08, 2004 7:57 pm
Forum: Volume 1 (100-199)
Topic: 138 - Street Numbers
Replies: 93
Views: 7922

### 138 - Steet numbers

I need help from people's whos have linux and same compiler like OJ. plz write output for this program, becouse i get that output on my win98 with devc++(orginal compiler):
[output removed]
And there is code:

Code: Select all

``````code removed by Jan
``````
Best Regards Rav
Mon Aug 25, 2003 10:37 am
Forum: Volume 3 (300-399)
Topic: 306 - Cipher
Replies: 74
Views: 19386
hi i got TL too. but i thing my algo i good. can cycle be larger then long int ? here is my algo to find cycle: [cpp] long int euklid (long int x,long int y) /* biggest common factor. (this function is good i think */ { long int g=1,t; while ((x%2==0) && (y%2==0)) { x/=2; y/=2; g*=2; } while (x>0) {...
Wed Aug 13, 2003 10:02 am
Forum: Volume 3 (300-399)
Topic: 333 - Recognizing Good ISBNs
Replies: 166
Views: 22993
thanks all finally i got AC. CE was in function isdigit(c):
[cpp]if(isdigit(c))[/cpp] //c is char;
can someone tells me why there was problem ?

Best Regards
Tue Aug 12, 2003 11:27 am
Forum: Volume 3 (300-399)
Topic: 333 - Recognizing Good ISBNs
Replies: 166
Views: 22993
thanks for help it help my much but i'm disappointed beacuse i upgrade my code and get same output: 0823025713 is correct. 013152447X is correct. 013152447x is incorrect. is incorrect. 082302571 is incorrect. 08230257130 is incorrect. 2803025713 is incorrect. 07632200X1 is incorrect. 0823025713 is c...
Mon Aug 11, 2003 11:15 pm
Forum: Volume 3 (300-399)
Topic: 333 - Recognizing Good ISBNs
Replies: 166
Views: 22993
my prog gives answers for this input: my prog dont show space in output 0823025713 is correct. 013152447X is correct. 013152447x is incorrect. is incorrect. 082302571 is incorrect. 08230257130 is incorrect. 2803025713 is incorrect. 07632200X1 is incorrect. 0823025713 is correct. 0823025713 is correc...
Mon Aug 11, 2003 7:55 pm
Forum: Volume 3 (300-399)
Topic: 333 - Recognizing Good ISBNs
Replies: 166
Views: 22993

### valid characters

could you tell me what character is valid. if i good understand valid ISBN: 1) must have 10 digit or X 2) may contain hyphens( - ) somwhere like this --------------0-89237-010-6 do ( _ ) is hyphen too ? 3) may contain X somwhere (however hisoka spoke that only on 10th is this right ?) 4) end at \n o...
Mon Aug 11, 2003 12:56 pm
Forum: Volume 3 (300-399)
Topic: 332 - Rational Numbers from Repeating Fractions
Replies: 83
Views: 21158

### 332 - precision problem

could somebody tells my how use better precison in this problese. i got TLE but my prog and algorithm work fine, but somthing w precision. Please help. Here is my source code C++ [cpp] #include <stdio.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <iostream> using namesp...
Mon Aug 04, 2003 4:17 pm
Forum: Volume 1 (100-199)
Topic: 138 - Street Numbers
Replies: 93
Views: 7922
hello i'm angry beacouse i thought about alghoritm and i discovered this [cpp] #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <stdio.h> #include <iostream> #include <string> #include <cmath> using namespace std; int main() { int wsk=0,s=2; double pier; while (wsk<10) { usin...
Thu Jul 24, 2003 7:33 am
Forum: Volume 1 (100-199)
Topic: 138 - Street Numbers
Replies: 93
Views: 7922
after speeding up(only in if i do l2*=4; that what hisoka said )i sended this aggain and got WA. strang 1744233 2003/07/24 05:24:21.109 Wrong Answer 0:07.117 396 32286 C++ 138 - Street Numbers there is mys econd code: [cpp] #include <stdio.h> #include <math.h> using namespace std; int main() { int i...
Thu Jul 24, 2003 7:26 am
Forum: Volume 1 (100-199)
Topic: 138 - Street Numbers
Replies: 93
Views: 7922
ok thanks
if output is good then i can speed it up(not just by sending table). but when i send it first time it was TE (i tetsed on my computer was 10-11s) then i send socend time and get WA. whanever thanks. i will be have AC soon.
Best Regards
Wed Jul 23, 2003 7:52 pm
Forum: Volume 1 (100-199)
Topic: 138 - Street Numbers
Replies: 93
Views: 7922
could someone tells me why OJ gives WA for this code ? [cpp] #include <stdio.h> #include <math.h> int main() { int ilosc; long int l1,il2; long double pier,l2; l2=2; ilosc=0; while (ilosc<10) { pier=sqrt(l2/2*(l2+1)); l1=(long int)(pier); if (l1==pier) { il2=(long int)(l2); printf("%10Ld%10Ld\n",l1,...