Please, try EDU on Codeforces! New educational section with videos, subtitles, texts, and problems. ×

### once_twice's blog

By once_twice, history, 4 weeks ago, ,

Can someone tell why i get MLE in Problem D of last round ?

https://codeforces.com/contest/1363/submission/82256919

 » 4 weeks ago, # | ← Rev. 2 →   +3 82259253 I simply added bunch of if(!~res) return 0; or if(s[0] == 'I') return 0;.I think it's better not to ignore those If the subset of indices queried is invalid or you exceeded the number of queries (for example one of the indices is greater than n) then you will get x=−1. In this case, you should terminate the program immediately. or If the guessed password is incorrect, you will receive the string "Incorrect". In this case, you should terminate the program immediately. conditions. They're really there to help you debug.If you find writing them everytime repetitive, you could just write a function which processes querying/answering like this.
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.15067830681800842, "perplexity": 2898.888058871131}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2020-29/segments/1593655880243.25/warc/CC-MAIN-20200702205206-20200702235206-00001.warc.gz"}