-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #266 from pehrsoderman/include-example-in-manifest
Fix running of tests using pybuild
- Loading branch information
Showing
16 changed files
with
115 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
recursive-include problemtools/config * | ||
recursive-include problemtools/templates * | ||
recursive-include problemtools/tests * | ||
recursive-include examples * | ||
recursive-include support * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Hello World! |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/usr/bin/env python3 | ||
from sys import stdin | ||
import sys | ||
|
||
# There shouldn't be any input | ||
assert len(stdin.readline()) == 0 | ||
|
||
sys.exit(42) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
source: Kattis | ||
license: public domain | ||
|
||
# Fix memory limit at 512 MB. (Note that for most problems, this | ||
# should not be done. It is only done in this case because we include | ||
# a test submission that goes over this limit.) | ||
limits: | ||
memory: 512 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
\problemname{Hello World!} | ||
|
||
\section*{Input} | ||
|
||
There is no input for this problem. | ||
|
||
\section*{Output} | ||
|
||
Output should contain one line, containing the string ``Hello World!''. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
\problemname{Hej Världen!} | ||
|
||
\section*{Indata} | ||
|
||
Detta problem har inget indata. | ||
|
||
\section*{Output} | ||
|
||
Utdata ska bestå av en rad, innehållandes strängen ``Hello World!''. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#include <cstdio> | ||
|
||
int main(void) { | ||
printf("Hello World!\n"); | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
public class hello { | ||
public static void main(String args[]) { | ||
System.out.println("Hello World!"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
fun main(args: Array<String>) { | ||
val words = if (args.size == 0) arrayOf("Hello", "World!") else args | ||
System.`out`.println(words.joinToString(separator = " ")) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/usr/bin/env python3 | ||
|
||
print('Hello World!') |
35 changes: 35 additions & 0 deletions
35
problemtools/tests/hello/submissions/accepted/hello_alarm.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#include <signal.h> | ||
#include <stdio.h> | ||
#include <stdlib.h> | ||
|
||
/* Based on the libc manual*/ | ||
|
||
/* This flag controls termination of the main loop. */ | ||
volatile sig_atomic_t keep_going = 1; | ||
|
||
/* The signal handler just clears the flag and re-enables itself. */ | ||
void catch_alarm (int sig) | ||
{ | ||
keep_going = 0; | ||
signal (sig, catch_alarm); | ||
} | ||
|
||
void do_nothing (void) | ||
{ | ||
int i=0; | ||
for (i=0;i<1000;i+=1); | ||
} | ||
|
||
int main (void) | ||
{ | ||
/* Establish a handler for SIGALRM signals. */ | ||
signal (SIGALRM, catch_alarm); | ||
/* Set an alarm to go off in a little while. */ | ||
alarm (1); | ||
/* Check the flag once in a while to see when to quit. */ | ||
while (keep_going) | ||
do_nothing(); | ||
|
||
printf("Hello World!\n"); | ||
return EXIT_SUCCESS; | ||
} |
11 changes: 11 additions & 0 deletions
11
problemtools/tests/hello/submissions/run_time_error/memory_limit.cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#include <iostream> | ||
#include <algorithm> | ||
|
||
int main(void) { | ||
char *buf = new char[512*1024*1024]; // 512MB | ||
buf[0] = 0; | ||
for (int i = 1; i < 512*1024*1024; ++i) | ||
buf[i] = 23*buf[i-1]+42; | ||
std::cout << "Hello World!\n" << std::endl; | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#include <cstdio> | ||
|
||
int main(void) { | ||
printf("Hello!"); | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters