@ip-algorithmics/codeforces-io
Version:
Codeforces IO functions
19 lines (18 loc) • 905 B
TypeScript
/**
* Reads the `input.txt` file from the same folder and returns it line by line. Multiple calls to this functions should be made to scan the entire file.
* @param path - Path to the input file. Optional, defaults to ./input.txt
* @returns return the next line of the read file or empty string on End of File - This is by design, on Algorithmic problems inputs are usually contiguous
*/
export declare function readline(path?: string): string;
/**
* Prints to console the parameters
* @param args - any
*/
export declare function print(...args: any[]): void;
/**
* Reads the `output.txt` file from the same folder and compares the content with what was printed to the console.
* @param path - Path to the output file. Optional, defaults to ./output.txt
*/
export declare function testOutput(path?: string): void;
declare const konsole: Console;
export { konsole as console };