Skip to content

Commit 34afe4e

Browse files
committed
Remove check of ONLINE_JUDGE & DOMJUDGE in example submissions
We don't set this in the default installation anymore and haven't for years.
1 parent 9cea18e commit 34afe4e

File tree

6 files changed

+4
-27
lines changed

6 files changed

+4
-27
lines changed

example_problems/hello/submissions/accepted/extra-file-awk/test-hello.awk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
#
44
# @EXPECTED_RESULTS@: CORRECT
55

6-
BEGIN { if ( DOMJUDGE ) print "Hello world!"; else print "variable DOMJUDGE not set" }
6+
BEGIN { print "Hello world!" }

example_problems/hello/submissions/accepted/extra-file-cs/test-hello.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ public class Hello
1111
{
1212
public static void Main(string[] args)
1313
{
14-
#if ONLINE_JUDGE
1514
Console.Write("Hello world!\n");
16-
#else
17-
Console.Write("ONLINE_JUDGE not defined\n");
18-
#endif
1915
}
2016
}

example_problems/hello/submissions/accepted/extra-file-f95/test-hello.f95

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@
55
! @EXPECTED_RESULTS@: CORRECT
66
!
77
program hello
8-
#ifdef DOMJUDGE
9-
write(*,"(A)") "Hello world!"
10-
#else
11-
write(*,"(A)") "DOMJUDGE not defined"
12-
#endif
8+
write(*,"(A)") "Hello world!"
139
end program hello
1410

example_problems/hello/submissions/accepted/extra-file-js/test-hello.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,4 @@
33
//
44
// @EXPECTED_RESULTS@: CORRECT
55

6-
if ( process.env.DOMJUDGE ) {
7-
console.log('Hello world!');
8-
} else {
9-
console.log('DOMJUDGE not defined');
10-
process.exit(1);
11-
}
6+
console.log('Hello world!');

example_problems/hello/submissions/accepted/extra-file-rb/test-hello.rb

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,4 @@
33
#
44
# @EXPECTED_RESULTS@: CORRECT
55

6-
if ENV['DOMJUDGE'] != '' then
7-
puts "Hello world!"
8-
else
9-
puts "DOMJUDGE not defined"
10-
exit(1)
11-
end
6+
puts "Hello world!"

example_problems/hello/submissions/accepted/extra-file-sh/test-hello.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@
33
#
44
# @EXPECTED_RESULTS@: CORRECT
55

6-
if [ -z "$DOMJUDGE" -o -z "$ONLINE_JUDGE" ]; then
7-
echo "Variable DOMJUDGE and/or ONLINE_JUDGE not defined."
8-
exit 1
9-
fi
10-
116
echo "Hello world!"
127

138
exit 0

0 commit comments

Comments
 (0)