From: Marius Gavrilescu Date: Thu, 22 Jan 2015 21:24:44 +0000 (+0200) Subject: Rename t/problems/increment/int.cpp to ver.cpp X-Git-Tag: 5999.000_005~103 X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=740c2415f3554be3989e05dc5f36ab6acf514114;p=gruntmaster-daemon.git Rename t/problems/increment/int.cpp to ver.cpp --- diff --git a/t/problems/increment/int.cpp b/t/problems/increment/int.cpp deleted file mode 100644 index 3b89262..0000000 --- a/t/problems/increment/int.cpp +++ /dev/null @@ -1,23 +0,0 @@ -#include -#include -#include -#include - -int main(void){ - srand(time(NULL)); - for(int i=0;i<100;i++){ - int nr = rand() % 100; - printf("%d\n", nr); - fflush(stdout); - int ret; - scanf("%d", &ret); - if(ret != nr + 1){ - fprintf(stderr, "bad ret: %d instead of %d", ret, nr + 1); - return 1; - } - } - - if(write(4, "20", 2) == -1) - perror("write"); - return 0; -} diff --git a/t/problems/increment/meta.yml b/t/problems/increment/meta.yml index ebf126a..0e18762 100644 --- a/t/problems/increment/meta.yml +++ b/t/problems/increment/meta.yml @@ -10,4 +10,4 @@ description: A trivial interactive problem files: ver: format: CPP - name: int.cpp + name: ver.cpp diff --git a/t/problems/increment/ver.cpp b/t/problems/increment/ver.cpp new file mode 100644 index 0000000..3b89262 --- /dev/null +++ b/t/problems/increment/ver.cpp @@ -0,0 +1,23 @@ +#include +#include +#include +#include + +int main(void){ + srand(time(NULL)); + for(int i=0;i<100;i++){ + int nr = rand() % 100; + printf("%d\n", nr); + fflush(stdout); + int ret; + scanf("%d", &ret); + if(ret != nr + 1){ + fprintf(stderr, "bad ret: %d instead of %d", ret, nr + 1); + return 1; + } + } + + if(write(4, "20", 2) == -1) + perror("write"); + return 0; +}