正文
增加 21 行删除 15 行
123456310 行未改动全部展开31731831932032132232332432532632732832933033113 行未改动34534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638716 行未改动40440540640740840941041116 行未改动42842943043143243343443543620 行未改动45745845946046146246346446534 行未改动5005015025035045055065075088 行未改动众所周知,最近在休闲娱乐版爆火了一款新的游戏——[OI 教练模拟器]()。于是经过一晚上的努力,我们获得了这样的战绩:310 行未改动全部展开```javascriptcompetitions.push({week: 37, name:"IOI", difficulty:55000, maxScore:600, numProblems:6, nationalTeam:true,subtasksPerProblem:15});```# 突破国家队人数限制我们可以循环上述过程,添加大量的咋克。国家队人数的限制机制出现在 CTS 后的结算过程中,但由于我们不是通过 CTS 将咋克们加入国家队的,而是直接编辑国家队名单,所以我们根本不会被这个限制影响。于是我们将上面用到的代码拼凑一下,套上循环得到完整的代码:```//将 IOI 加入比赛列表competitions.push({week: 37, name:"IOI", difficulty:55000, maxScore:600, numProblems:6, nationalTeam:true,subtasksPerProblem:15});game.inNationalTeam = true;game.nationalTeamResults = {13 行未改动superStudent.comfort = 500000000;superStudent.sick_weeks = 0;superStudent.active = true;game.nationalTeamResults.ioiQualified.push('zak'+String(i));TalentManager.registerDefaultTalents();let sss=Object.values(TalentManager._talents || {});for(let i=0;i<50;i++){if(sss[i].beneficial){superStudent.addTalent(sss[i].name);}}game.students.push(superStudent);const secondYearIOI = competitions.find(c => c.name === 'IOI1' && c.week > WEEKS_PER_HALF);const targetWeek = secondYearIOI ? secondYearIOI.week - 1 : 36;if(game.week < targetWeek) {const weeksToJump = targetWeek - game.week;game.week = targetWeek;}const halfIndex = 1;if(!game.qualification[halfIndex]) {game.qualification[halfIndex] = {};}for(let compName of COMPETITION_ORDER) {if(!game.qualification[halfIndex][compName]) {game.qualification[halfIndex][compName] = new Set();}game.qualification[halfIndex][compName].add(superStudent.name);}if(!game.completedCompetitions) {game.completedCompetitions = new Set();}for(let comp of competitions) {if(comp.week < targetWeek && comp.week > WEEKS_PER_HALF) {const key = `${halfIndex}_${comp.name}_${comp.week}`;game.completedCompetitions.add(key);16 行未改动这样,即使字典序十分靠后,由于其他国家的选手实在太菜了,我们的咋克仍然稳稳地拿下了金牌!# 防止测挂在源代码页面容易找到测挂程序 `lib/devtools-detector.js`(笔者编写本文时被删除了,不知道什么时候加回来,以及加回来后这些方法还是否靠谱)。16 行未改动// ==/UserScript==(function() {'use strict';setTimeout("competitions.push({week: 37, name:'IOI', difficulty:55000, maxScore:600, numProblems:6, nationalTeam:true,subtasksPerProblem:15});\game.inNationalTeam = true;\game.nationalTeamResults = {\ioiQualified: []\};\20 行未改动}\\game.students.push(superStudent);\\const secondYearIOI = competitions.find(c => c.name === 'IOI1' && c.week > WEEKS_PER_HALF);\const targetWeek = secondYearIOI ? secondYearIOI.week - 1 : 36;\\if(game.week < targetWeek) {\const weeksToJump = targetWeek - game.week;\34 行未改动renderAll();",3000 );})();```在油猴创建一个用户脚本并将这些内容贴进去就大功告成了!现在打开游戏,你就会发现:在游戏开始 $3$ 秒后,你的学生会变成 $20$ 个咋克,而且现在是 IOI 前夕,这些咋克甚至突破了只能去两人的限制,都可以去参加 IOI!# 彩蛋8 行未改动12345678910310 行未改动全部展开32132232332432532632732832933033133233333433513 行未改动34935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039116 行未改动40840941041141241341441541641716 行未改动43443543643743843944044144220 行未改动46346446546646746846947047134 行未改动5065075085095105115125135148 行未改动- 注:截至 11 月 13 日,本文中的内容在[原版](http://oi.seveoi.icu/)和 [QOJ 版](https://qoj.ac/files/OItrainer-main/start.html)通用。- 注 2:由于联系不到管理,本文改投至与之比较相关的科技·工程版。- 注 3:就在过审的瞬间我调了一下里面的数值,能基本确保所有咋克都 AK 而其他国家被区分。麻烦管理大大重审一下吧 /kk 实在不好意思众所周知,最近在休闲娱乐版爆火了一款新的游戏——[OI 教练模拟器](https://www.luogu.com.cn/article/1s9wdoal)。于是经过一晚上的努力,我们获得了这样的战绩:310 行未改动全部展开```javascriptcompetitions.push({week: 37, name:"IOI", difficulty:55000, maxScore:600, numProblems:6, nationalTeam:true,subtasksPerProblem:15});```# 添加更多咋克并突破国家队人数限制我们可以循环上述过程,添加大量的咋克。国家队人数的限制机制出现在 CTS 后的结算过程中,但由于我们不是通过 CTS 将咋克们加入国家队的,而是直接编辑国家队名单,所以我们根本不会被这个限制影响。于是我们将上面用到的代码拼凑一下,套上循环得到完整的代码:```//将 IOI 加入比赛列表competitions.push({week: 37, name:"IOI", difficulty:300000000, maxScore:600, numProblems:6, nationalTeam:true,subtasksPerProblem:15});game.inNationalTeam = true;game.nationalTeamResults = {13 行未改动superStudent.comfort = 500000000;superStudent.sick_weeks = 0;superStudent.active = true;game.nationalTeamResults.ioiQualified.push('zak'+String(i));TalentManager.registerDefaultTalents();let sss=Object.values(TalentManager._talents || {});for(let i=0;i<50;i++){if(sss[i].beneficial){superStudent.addTalent(sss[i].name);}}game.students.push(superStudent);const secondYearIOI = competitions.find(c => c.name === 'IOI' && c.week > WEEKS_PER_HALF);const targetWeek = secondYearIOI ? secondYearIOI.week - 1 : 36;if(game.week < targetWeek) {const weeksToJump = targetWeek - game.week;game.week = targetWeek;}const halfIndex = 1;if(!game.qualification[halfIndex]) {game.qualification[halfIndex] = {};}for(let compName of COMPETITION_ORDER) {if(!game.qualification[halfIndex][compName]) {game.qualification[halfIndex][compName] = new Set();}game.qualification[halfIndex][compName].add(superStudent.name);}if(!game.completedCompetitions) {game.completedCompetitions = new Set();}for(let comp of competitions) {if(comp.week < targetWeek && comp.week > WEEKS_PER_HALF) {const key = `${halfIndex}_${comp.name}_${comp.week}`;game.completedCompetitions.add(key);16 行未改动这样,即使字典序十分靠后,由于其他国家的选手实在太菜了,我们的咋克仍然稳稳地拿下了金牌!上述代码的使用方式是,浏览器打开游戏界面后按 F12,然后在弹出的窗口顶部找到“控制台”或“Console”,如果没有则单击顶部右侧的“>”,在弹出的菜单中找到“控制台”或“Console”。这时窗口会变成一个类似于 cmd 的可以输代码的地方,把刚才的代码贴进去按回车即可。# 防止测挂在源代码页面容易找到测挂程序 `lib/devtools-detector.js`(笔者编写本文时被删除了,不知道什么时候加回来,以及加回来后这些方法还是否靠谱)。16 行未改动// ==/UserScript==(function() {'use strict';setTimeout("competitions.push({week: 37, name:'IOI', difficulty:300000000, maxScore:600, numProblems:6, nationalTeam:true,subtasksPerProblem:15});\game.inNationalTeam = true;\game.nationalTeamResults = {\ioiQualified: []\};\20 行未改动}\\game.students.push(superStudent);\\const secondYearIOI = competitions.find(c => c.name === 'IOI' && c.week > WEEKS_PER_HALF);\const targetWeek = secondYearIOI ? secondYearIOI.week - 1 : 36;\\if(game.week < targetWeek) {\const weeksToJump = targetWeek - game.week;\34 行未改动renderAll();",3000 );})();```在油猴创建一个用户脚本并将内容换成上面这些就大功告成了!现在打开游戏,你就会发现:在游戏开始 $3$ 秒后,你的学生会变成 $20$ 个咋克,而且现在是 IOI 前夕,这些咋克甚至突破了只能去两人的限制,都可以去参加 IOI!# 彩蛋8 行未改动