Older Contests
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP ContestsOlder Contests

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old October 23rd, 2003, 09:28 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
[numbers] Output format

OK, we know that the input file will contain random(5,50) "problems", each consisting of seven numbers in a line.

But i have doubts about the output format (with checkme=0). Should I output also 5-50 line, each with the number of posible solutions to the problem in the same line in the input file? e.g., as in:
php Code:
Original - php Code
  1.  
  2. $problems = file($inputfile);
  3. foreach($problems as $problem)
  4. {
  5.   // calculation
  6.  
  7.   echo $number_of_solutions."n";
  8. }


Or should I output another format?


-- ivansanchez-at-escomposlinux-dot-org

Reply With Quote
  #2  
Old October 23rd, 2003, 11:11 PM
Matt Matt is offline
Moderator
Codewalkers Specialist (4000 - 4499 posts)
 
Join Date: Apr 2007
Location: Florida
Posts: 4,158 Matt User rank is Private First Class (20 - 50 Reputation Level)Matt User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 h 10 m 20 sec
Reputation Power: 6
[numbers] RE: Output format

Quote:
Your script should simply output the number of distinct ways it was able to come to the target numbers. This is the TOTAL. Figure out how many ways you are able to come to the target number for each line in the input file and add that together and output it. Do not output anything else besides the total number.


A single number is all you will output.

Reply With Quote
  #3  
Old October 25th, 2003, 03:54 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
[numbers] RE: Output format

does the results should be returned as TXT or as HTML output? on both (checkme && input)?

also, the checkme=1 would call a html form to get the numbers entered? the returned values shoud appear on the same browser? if so, as txt or as html?

like this;
1,2,3,6n
1+2+3n
2*3n
1*2*3n

or like this:
1,2,3,6<br>
1+2+3<br>
2*3<br>
1*2*3<br>


Reply With Quote
  #4  
Old October 25th, 2003, 04:40 PM
Matt Matt is offline
Moderator
Codewalkers Specialist (4000 - 4499 posts)
 
Join Date: Apr 2007
Location: Florida
Posts: 4,158 Matt User rank is Private First Class (20 - 50 Reputation Level)Matt User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 h 10 m 20 sec
Reputation Power: 6
[numbers] RE: Output format

For the checkme=1, yes you should display a HTML form. That form should display the answers in the same browser. I am not picky about those display results.

As for your first question, all you should output is a single number. No HTML tags or anything else.

Reply With Quote
  #5  
Old October 26th, 2003, 02:11 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
[numbers] RE: Output format

so, I assume the results from the checkme=1 will have html tags (<br> at least) and the input=input.txt results would be only separated by n

this is correct?

Reply With Quote
  #6  
Old October 26th, 2003, 05:28 PM
Matt Matt is offline
Moderator
Codewalkers Specialist (4000 - 4499 posts)
 
Join Date: Apr 2007
Location: Florida
Posts: 4,158 Matt User rank is Private First Class (20 - 50 Reputation Level)Matt User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 h 10 m 20 sec
Reputation Power: 6
[numbers] RE: RE: Output format


Quote:
so, I assume the results from the checkme=1 will have html tags (<br> at least) and the input=input.txt results would be only separated by n

this is correct?


I am not picky about the checkme=1 output. Display it as you will, as long as I can figure out what it is.

As for the other way, there should be no n, no <br>, NOTHING EXCEPT A SINGLE NUMBER!

Please read this quote from the rules again:

Quote:
Figure out how many ways you are able to come to the target number for each line in the input file and add that together and output it. Do not output anything else besides the total number.


Reply With Quote
  #7  
Old October 26th, 2003, 05:48 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
[numbers] RE: Output format

ok! understood!
add every single result from every line!

I was thinking it was add all the results from each line!
ok thanks!

Reply With Quote
  #8  
Old October 26th, 2003, 09:15 PM
ivansanchez ivansanchez is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Madrid, Spain
Posts: 35 ivansanchez User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via ICQ to ivansanchez
[numbers] RE: RE: RE: Output format

Quote:
I am not picky about the checkme=1 output. Display it as you will, as long as I can figure out what it is.


Does it also apply to the logfile format, or do you want an specific format?

Reply With Quote
  #9  
Old October 26th, 2003, 11:23 PM
Stapr Stapr is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Palm Bay, Florida
Posts: 6 Stapr User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
[numbers] RE: RE: RE: RE: Output format

Quote:
Quote:
I am not picky about the checkme=1 output. Display it as you will, as long as I can figure out what it is.


Does it also apply to the logfile format, or do you want an specific format?


It says in the contest rules:

Quote:
This log file should contain a line read in from the input file, then all solutions you find (each on a seperate line). The log file will then contain the next line from the input file, and all its solutions, and so on. This log file should be output to the directory your script resides in and will be called {inputfile}.out.

Reply With Quote
  #10  
Old October 27th, 2003, 01:05 AM
Matt Matt is offline
Moderator
Codewalkers Specialist (4000 - 4499 posts)
 
Join Date: Apr 2007
Location: Florida
Posts: 4,158 Matt User rank is Private First Class (20 - 50 Reputation Level)Matt User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 h 10 m 20 sec
Reputation Power: 6
[numbers] RE: Output format

As long as you follow what is in the rules about the log file, you will be fine. I am not going to be picky about one person showing:

8 + 9 = 17

and another:

8+9=17

That doesn't matter to me....

Reply With Quote
  #11  
Old October 27th, 2003, 11:53 AM
honcho's Avatar
honcho honcho is offline
Contributing User
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Cape Cod
Posts: 1,347 honcho User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 52 m 2 sec
Reputation Power: 3
[numbers] RE: Output format

How about showing it in post-fix or pre-fix notation?

8 9 +

+ 8 9

Reply With Quote
  #12  
Old October 27th, 2003, 12:18 PM
Matt Matt is offline
Moderator
Codewalkers Specialist (4000 - 4499 posts)
 
Join Date: Apr 2007
Location: Florida
Posts: 4,158 Matt User rank is Private First Class (20 - 50 Reputation Level)Matt User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 h 10 m 20 sec
Reputation Power: 6
[numbers] RE: Output format

Fine by me...

Reply With Quote
  #13  
Old October 27th, 2003, 12:25 PM
ivansanchez ivansanchez is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Madrid, Spain
Posts: 35 ivansanchez User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via ICQ to ivansanchez
[numbers] RE: RE: Output format

What about referring to another file in the log (e.g. each line of the log saying "see line #235433 of result_table.txt")

Reply With Quote
  #14  
Old October 27th, 2003, 12:44 PM
Matt Matt is offline
Moderator
Codewalkers Specialist (4000 - 4499 posts)
 
Join Date: Apr 2007
Location: Florida
Posts: 4,158 Matt User rank is Private First Class (20 - 50 Reputation Level)Matt User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 h 10 m 20 sec
Reputation Power: 6
[numbers] RE: Output format

No, please keep it all in one log file.

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP ContestsOlder Contests > [numbers] Output format


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support |