MAIN
Home
Schedule
Rules
Compile
RESULTS
Results
PROBLEMS
Novice
Veteran
All
| |
Table of Contents:
Return to the Top of Page,
Index Page,
Novice Problem Set,
or Veteran Problem Set.
Borland Turbo Pascal v1.5 for Windows
NOTES | File Naming Conventions | To Make It Work | Example Program | Judges Information
NOTES:
Filenaming Conventions:
- All source submissions should have a file naming convention of p[n|v]<num>.pas where:
[n|v] refers to either novice or veteran
<num> refers to the problem number
For example, if you are a novice team working on problem 3, your filename would be: pn3.pas
- If you are planning to do file I/O, you must name your input file test.in and your output file must be test.out.
To Make It Work:
Example Program:
program Welcome;
uses WinCRT;
var
name: string;
begin
Assign(Input,'pn3.in'); Reset(Input);
Assign(Output,'pn3.out'); Rewrite(Output);
Readln(name);
Writeln('Welcome to Turbo Pascal for Windows, ',name);
Close(Output);
end.
Items in cyan are the needed additions for file I/O using standard I/O commands.
Judges Information:
- Delete C:\TEMP\test.*
- Open Borland Turbo Pascal and create a TEST.PAS file
- Copy the student's source from their submitted file and paste it into the TEST.PAS
- Copy the Judge Data for the particular problem from J:\ to C:\TEMP\test.in
- Look for the I AM USING FILE I/O comment. If it is present, skip this section:
- Make sure there is a uses WinCRT; section
- Add the following two lines just after the begin of the main program (if they aren't already there):
Assign(Input,'C:\TEMP\test.in'); Reset(Input);
Assign(Output,'C:\TEMP\test.out'); Rewrite(Output);
- Add the following line just before the end. of the main program:
- Select Compile | Build
- Select Run | Run
- Use NotePad or WordPad or Pascal to view the output file C:\TEMP\test.out
to determine if the solution is correct
Return to the Top of Page,
Index Page,
Novice Problem Set,
or Veteran Problem Set.
Microsoft QBasic
NOTES | File Naming Conventions | To Make It Work | Example Program | Judges Information
Return to the Top of Page,
Index Page,
Novice Problem Set,
or Veteran Problem Set.
Microsoft Visual Basic v5.0
NOTES | File Naming Conventions | To Make It Work | Example Program | Judges Information
NOTES:
- When you create your project, just select the standard.exe, not a GUI. Use only one form for your application. Submit only your form file (we just need the form source-- not the whole project).
File Naming Conventions:
- All source submissions should have a file naming convention of p[n|v]<num>.frm where:
[n|v] refers to either novice or veteran
<num> refers to the problem number
For example, if you are a novice team working on problem 3, your filename would be: pn3.frm
To Make It Work:
- Make sure to Open a local textfile for your input. We will be using command-line based redirection for testing. Also, you'll need to Open a second stream for local based textfile output. See the Example Program below.
Example Program:
Private Sub Form_Load()
Close #1
Open "c:\temp\a.a" For Input As #1
Dim b As Integer, c As Integer, d, e, f As Integer
Dim aa As Integer, bb As Integer, cc As Integer
b = 1
While b <> 0
Input #1, b
Input #1, c
f = b * c
Open "c:\temp\b" For Append As #2
Print #2, f
Close #2
Wend
Close #1
Unload Me
End Sub
Judges Information:
Return to the Top of Page,
Index Page,
Novice Problem Set,
or Veteran Problem Set.
Microsoft Visual C/C++ v5.0
NOTES | File Naming Conventions | To Make It Work | Example Program | Judges Information
NOTES:
- When creating a new project, make sure you select Win32 Console Application for the project type!
- When creating a new source file, choose C++ Source File and let it append a .cpp to your filename (this works even if you only code in C).
- The only types of files in your project should be C/C++ Header File and/or C++ Source File.
- Name the project and source file according to the File Naming Conventions below.
- Your project should have one .cpp file and may optionally have one matching .h file.
File Naming Conventions:
To Make It Work:
- Under the Build menu, select Rebuild All to compile.
- Under the Build menu, select Execute <filename> to run.
Example Program:
#include <stdio.h>
void main()
{
char name[80];
printf("What's your name? ");
scanf("%s",name);
printf("\nHello World!, %s\n",name);
}
Judges Information:
Steps to Judge
- Delete the old test project (you won't have to do this the first time) from the C:\TEMP\ directory with Windows Explorer
- Make a new Win32 Console Application test project in the C:\TEMP directory.
- Add a new judge C/C++ source file to the project.
- Paste user's source code into the source document.
- Build (it saves the compiled version to disk in the C:\TEMP\TEST\JUDGE\DEBUG directory).
- Switch to a DOS window.
- cd to the C:\TEMP\TEST\JUDGE\DEBUG directory.
- Copy the input datafile from C:\TEMP to this same directory.
- Run the program by: filename.exe < inputfile > outputfile
- Use Notepad to open the outputfile and compare it with the provided Solution Docuentation
Return to the Top of Page,
Index Page,
Novice Problem Set,
or Veteran Problem Set.
|