-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
read task.yaml.orig before task.yaml
- Loading branch information
Showing
12 changed files
with
217 additions
and
8 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
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,27 @@ | ||
mod common; | ||
use common::TestInterface; | ||
|
||
fn classic(test: TestInterface) { | ||
test.success() | ||
.time_limit(1.0) | ||
.memory_limit(64) | ||
.max_score(100.0) | ||
.subtask_scores(vec![5.0, 45.0, 50.0]) | ||
.must_compile("generatore.cpp") | ||
.must_compile("solution.cpp") | ||
.must_compile("wrong_file.cpp") | ||
.solution_score("solution.cpp", vec![5.0, 45.0, 50.0]) | ||
.solution_score("wrong_file.cpp", vec![0.0, 0.0, 0.0]); | ||
} | ||
|
||
#[test] | ||
fn classic_local() { | ||
better_panic::install(); | ||
classic(TestInterface::run_local("task-yaml-orig")); | ||
} | ||
|
||
#[test] | ||
fn classic_remote() { | ||
better_panic::install(); | ||
classic(TestInterface::run_remote("task-yaml-orig")); | ||
} |
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,18 @@ | ||
# This is a comment, this line should be ignored | ||
|
||
# The task is to echo the first parameter | ||
# If you exit fast enough and don't use much memory you will score 100 :P | ||
|
||
# Copy some file from some random folder | ||
#ST: 5 | ||
#COPY: gen/hard.txt | ||
|
||
# Small N | ||
#ST: 45 | ||
500 | ||
900 | ||
|
||
# Big N | ||
#ST: 50 | ||
1300 | ||
2000 |
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,10 @@ | ||
#include <iostream> | ||
|
||
int main(int argc, char** argv) { | ||
if (argc != 2) { | ||
std::cerr << "Usage: " << argv[0] << " N" << std::endl; // NOLINT | ||
return 1; | ||
} | ||
std::cout << argv[1] << std::endl; // NOLINT | ||
std::cerr << "This string should not appear in the input.txt" << std::endl; | ||
} |
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 |
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 | ||
|
||
MAX_N = 5000 |
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,12 @@ | ||
#!/usr/bin/env python3 | ||
|
||
# pylint: disable=wildcard-import | ||
# pylint: disable=invalid-name | ||
|
||
import sys | ||
from limiti import * | ||
|
||
assert len(sys.argv) == 3 | ||
infile = open(sys.argv[1]).read().splitlines() | ||
assert 0 <= int(infile[0]) <= MAX_N | ||
assert 1 <= int(sys.argv[2]) <= 3 |
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,7 @@ | ||
#include <iostream> | ||
|
||
int main() { | ||
int n; | ||
std::cin >> n; | ||
std::cout << n; | ||
} |
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,10 @@ | ||
#include <fstream> | ||
|
||
int main() { | ||
std::ifstream in("input.txt"); | ||
std::ofstream out("output.txt"); | ||
|
||
int n; | ||
in >> n; | ||
out << n << '\n'; | ||
} |
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,17 @@ | ||
name: task-yaml-orig | ||
title: Testing task.yaml.orig | ||
score_type: null | ||
score_precision: 0 | ||
time_limit: 1.0 | ||
memory_limit: 64 | ||
output_only: 'False' | ||
infile: '' | ||
outfile: '' | ||
difficulty: null | ||
syllabuslevel: null | ||
num_processes: null | ||
user_io: null | ||
score_mode: max_subtask | ||
token_mode: disabled | ||
public_testcases: all | ||
feedback_level: full |
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 @@ | ||
title: Testing task.yaml.orig | ||
time_limit: 1 | ||
memory_limit: 64 |