Hello. I am using Polygon to prepare problems.
This is my generator below:
#include <iostream>
#include "testlib.h"
long long int max2(long long int a, long long int b){
return a>b ? a : b;
}
long long int ten(int x){
long long int s=1;
for(int i=0; i<x; i++) s *= 10;
return s;
}
int main(int argc, char* argv[]){
registerGen(argc, argv, 1);
std::cout << rnd.next(1LL, atoll(argv[1])) << " ";
std::cout << rnd.next(1LL, atoll(argv[2])) << " ";
std::cout << rnd.next(1LL, atoll(argv[3])) << " ";
std::cout << rnd.next(max2(1, atoll(argv[4])/10), max2(100, atoll(argv[4]))) << std::endl;
}
Is there any wrong thing? It always verdict FL
in invocation and tests. Thank you for reading this.
EDIT 1 This is the log occurs when I try to generate inputs. ERROR: Unexpected verdict Can't prepare input file 'C:\Contesters\Work\invoker-prod\work\polygon2\34b2efc622c48530be13ce1989b01907\check-bc2d7412ca16433314f5a03914c1d409\run\input.fd0138e687.txt'.FAILED. Input:
1) Did tests generated?
2) Did you use some validators?
3) How do you generate tests?
In generator I don't see anything wrong.
This is my validator below:
I just generate tests like
large_power_series_generator 10 10 10 100 > {4-10}
but it says there is an error.EDIT 1: I used this generator and validator but generation failed. For your information, I used default checker.
> $
as it is a single test generator.To generate multitest you must in generator before cout write
startTest(test_index);
or generate singletest with
> $
It's useful to run a generator locally. Just put that generator and
testlib.h
library in the same directory, so it could be included. You can also download a validator and run it on that file. In Linux, the commands would be:./larger_power 10 10 10 100 > in.txt
./my_validator < in.txt
or just
./larger_power 10 10 10 100 | ./my_validator
You can also see the produced test with your eyes, to see if it looks fine.
If everything is ok in your machine, most likely you don't use the Polygon script correctly.
Thanks a lot for all people who answered!!