[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-273917-105":59,"doc-detail-273917-en":122},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":115,"head_meta":117,"extra_data":119,"updated_unix":121},105,"en","eleventh-annual-university-of-central-florida-high-school-programming-tournament-problems-division-2","Eleventh Annual University of Central Florida High School Programming Tournament - Problems - Division 2","","Eleventh Annual University of Central Florida High School Programming Tournament online edition presents Problems – Division 2, covering multiple algorithmic challenges. The set includes Chocolate Factory, where judge-contribution intervals must be chosen to minimize machine operations while producing identical chocolates for all members. It also includes Jenny’s Number, generating special prime-based numbers with distinct digits, and Mario’s Maze, describing grid navigation with elevators, fans, and poles under movement and entry constraints. Each problem specifies clear input formats and required outputs.",{"@graph":69,"@context":114},[70,84,105],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":20,"@type":76,"position":81},"https://docshare.wps.com/document/exam/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/eleventh-annual-university-of-central-florida-high-school-programming-tournament-problems-division-2/273917/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":99,"encodingFormat":97,"isAccessibleForFree":100,"interactionStatistic":101},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/eleventh-annual-university-of-central-florida-high-school-programming-tournament-problems-division-2/273917.png","ImageObject",300,407,{"name":92,"@type":93},"Jordan Avery","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-10-22","2026-09-15",true,{"@type":102,"interactionType":103,"userInteractionCount":81},"InteractionCounter",{"@type":104},"ViewAction",{"@type":106,"mainEntity":107},"FAQPage",[108],{"name":109,"@type":110,"acceptedAnswer":111},"How does Mario enter the castle in Mario’s Maze?","Question",{"text":112,"@type":113},"Mario may enter from any border side, but must enter a room on the first story and cannot enter a room containing an elevator, fan, or pole from outside.","Answer","https://schema.org",{"og:url":83,"og:type":116,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":118,"canonical":83},"index,follow",{"doc_id":120,"site_id":62},273917,1792276639,{"code":4,"msg":5,"data":123},{"doc_id":120,"user_id":124,"nickname":92,"user_avatar":125,"doc_module":4,"category_id":19,"category_name":20,"doc_title":65,"doc_description":67,"doc_content":126,"file_id":127,"file_url":128,"file_type":129,"file_size":130,"view_count":81,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":131,"language":132,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":133,"faqs":134,"seo_title":135,"seo_description":67,"update_tm":136,"read_time":137},1099523882367,"https://ap-avatar.wpscdn.com/davatar_9964176cb1d06d4a9deccf72a44ae3dc","Eleventh Annual University of Central Florida  \nHigh School Programming Tournament:  \nOnline Edition  \nProblems – Division 2  \nProblem Name  \nHSPT and the Chocolate Factory Jenny’s Number Mario’s Maze  \nNorth by Northwest Forgotten Password Radio Stations Snack Sort  \nHealing Sniper Sue in Bourbon  \nFilename  \nchocolate  \njenny  \nmaze  \nnorth  \npassword radio  \nsnack  \nsniper suburban  \nCall your program file:  \nfilename.c, filename.cpp, [filename](filename.java)[.java](filename.java), or f[ilename](ilename.py)[.py](ilename.py)  \nFor example, if you are solving North by Northwest, Call your program file:  \nnorth.c, north.cpp, [north.java](north.java), [or north.py](or north.py)[ ](or north.py)Call your Java class: north  \nHSPT and the Chocolate Factory  \nFilename: chocolate  \nThe members ofthe HSPT judges work very hard to make the contest a fun and memorable contest. As such, Glenn, chief judge, wishes to give all the members one chocolate for each problem on which they worked.  \nEach judge is given a unique ID numbered from 1 to n. This year there's an interesting property of the judges, though: if person i and person j both worked on the same problem, it is guaranteed that all people k such that i ≤ k ≤ j also worked on the same problem. This allows Glenn to order the people from left-to-right in an increasing order according to their ID numbers and thus problems to be defined by a range L to R of all the people who contributed to this problem.  \nGlenn has a machine that, given two numbers L and R, gives exactly one chocolate to each person starting from L and advancing rightward going up to R. Currently, for each problem Glenn enters the corresponding L and R values for the people who worked on the problem. However, this can be time-consuming, and being a problem-solver himself, Glenn would like to know the minimum number of times he has to enter values into the machine with an optimal selection of intervals that results in each person receiving the same number of chocolates at the end.  \nFor example, if the final array of chocolates should be [1, 2, 2, 3, 3, 2, 2, 1], then the chocolates could be distributed in three intervals: [1, 8], [2, 7], and [4, 5] . Therefore, Glenn can distribute the chocolates with only three operations of the machine.  \nThe Problem:  \nGiven n, the number of HSPT team members, m, the number of problems, and the judges interval, determine the minimum number of times Glenn has to operate the chocolate-giving machine.  \nThe Input:  \nThe first line of input will contain a single integer, c, representing the number of contests to process. The first line of each contest contains two integers, n and m (1 ≤ n ≤ 105 ; 1 ≤ m ≤ 105), representing the highest judge ID and the number of problems, respectively. The following m lines contain two integers, L and R (1 ≤ L ≤ R ≤ n), which represents the interval of judges that worked on this problem.  \nThe Output:  \nFor each contest, output a single integer, x, on a newline, where x is the minimum number of times Glenn has to operate the machine and still results in each person receiving the correct number of chocolates at the end.  \nSample Input:  \n2 8  \n1 6  \n5 4  \n4 2  \n5 1  \n2 3  \n6 3  \n8 7  \n5 5  \n4 3  \n3 4  \n5  \nSample Output:  \n3 3  \nJenny’s Number  \nFilename: jenny  \nBrice is head over heels for his crush, Jenny, a promising and beautiful Math major at UCF. Everyone knows that Jenny’s phone number is 867-5309. Brice knows that Jenny, being infatuated with mathematical quirks, will only enter somebody’s phone number into her phone if they follow these three criteria:  \n● The number is a prime  \n● The next odd number is a prime  \n● The digits in the number are all distinct  \nWe’ll call numbers that pass these criteria “Jenny Numbers.” As you might have figured out, 867-5309 is a Jenny number.  \nBrice was about to get a new phone anyway, so he figures he should make the most of it and choose a number such that he has a chance that Jenny would put his number i","cbCaimQ4sGPDzrLL","https://ap.wps.com/l/cbCaimQ4sGPDzrLL","pdf",402461,13,"English","# HSPT and the Chocolate Factory\n## Input\n## Output\n# Jenny’s Number\n## Input\n## Output\n# Mario’s Maze\n## Problem description","[{\"question\":\"How does Mario enter the castle in Mario’s Maze?\",\"answer\":\"Mario may enter from any border side, but must enter a room on the first story and cannot enter a room containing an elevator, fan, or pole from outside.\"}]","Eleventh Annual University of Central Florida High School Programming Tournament - Problems - Division 2 | PDF",1789473399,33]