跳到正文

zhujvnhan

821607

在洛谷打开
资料、奖项与版本

资料

编号
821607
抓取
Java
	var userlist = 
["StayAlone","Hooch","ChickenURSoBeautiful","LPhang"];
                <!-- 观察成员列表 -->
var pages = 1;  <!-- 初始检查做题记录页数,建议设置为 1-2 -->
var cd = 10000; <!-- 自动检查每个人时间间隔,建议保持为 10000,以免 GG-->
function onSearch(obj)
{
    var storeId=document.getElementById('store');
    var rowsLength=storeId.rows.length;
    var key=document.getElementById('key').value;
    for(var i=1;i < rowsLength;i++)
    {
        var searchText=storeId.rows[i].cells[0].innerHTML;
        if(key=="*"||searchText.match(key))
            storeId.rows[i].style.display='';
        else
            storeId.rows[i].style.display='none';
    }
};
str='<div><select onchange="onSearch()" name="key" id="key"><option value="*">*</option>';
for(var i=0;i < userlist.length;i++)
    str+='<option value="'+userlist[i]+'">'+userlist[i]+'</option>';
str+='</select></div><table id="store" style="white-space: nowrap;"><tr><th>用户</th><th>题号</th><th>标题</th></tr></table>';
document.body.innerHTML = "<h1 style='text-align:center;color:red;font-family:Microsoft Yahei'>内卷监视工具</h1>";
document.body.innerHTML += "<b style='text-align:center;font-family:FangSong'>运筹首页之中,偷袭千里之外&#128517;</b><hr>" + str;
<!-- Output Emoji & Option -->
var colors=['rgb(191, 191, 191)','rgb(254, 76, 97)','rgb(243, 156, 17)','rgb(255, 193, 22)','rgb(82, 196, 26)','rgb(52, 152, 219)','rgb(157, 61, 207)','rgb(14, 29, 105)'];
var name="灰红橙黄绿蓝紫黑";
var lst=Array();
var cnt=0;
function PARSE(First=false)
{
    cnt=(cnt+1)%userlist.length;
    var user=userlist[cnt];
    var Pagenum=1;if(First)Pagenum=pages;
    for(;Pagenum>0;Pagenum--)
    {
        var httpRequest=new XMLHttpRequest();
        httpRequest.open('GET','https://www.luogu.com.cn/record/list?user='+user+'&page='+Pagenum,false);
        httpRequest.send();
        if(httpRequest.readyState==4&&httpRequest.status==200)
        {
            var content=httpRequest.responseText;
            var patten=/decodeURIComponent\(".*?"\)/;
            content=patten.exec(content)[0];
            content=content.substr(20,content.length-22);
            content=JSON.parse(decodeURIComponent(content));
            var prob,col,pid,title;
            for(var i=Math.min(content.currentData.records.result.length-1,19);i>=0;i--)
                if(content.currentData.records.result[i].status==12&&content.currentData.records.result[i].id>lst[cnt])
                {
                    prob=content.currentData.records.result[i].problem;
                    col=colors[prob.difficulty];
                    pid=prob.pid;
                    title=prob.title;
                    document.getElementById('store').childNodes[0].innerHTML
                        +='<tr><td>'+user+'</td><td>'+pid+'</td><td>'+
                            "<a style='color:"+col+"' href='https://www.luogu.com.cn/problem/"+pid+"' target='_blank'>"
                        +title+"</a>"+'</td></tr>';
                    if(!First)
                        alert(user+" 刚刚卷了"+name[prob.difficulty]+"题 "+pid+" "+title);
                    lst[cnt]=content.currentData.records.result[i].id
                }
        }
    }
}
for(var i=0;i < userlist.length;i++)lst[i]=0;
for(var i=0;i < userlist.length;i++)PARSE(true);
window.setInterval(PARSE,cd);
共 7 篇
  1. 题解

    题解:P1012 [NOIP 1998 提高组] 拼数

    题目分析 这道题要求将n个正整数连接起来,形成一个最大的整数。关键在于确定数字的连接顺序,而不是简单按照数值大小排序。 核心思路 问题的本质是‌自定义排序‌。我们需要定义一种比较规则,使得在排序后按顺序连接得到的整数最大。 关键洞察 对于两个数字a和b,我们应该比较的是两种连接方…

  2. 题解

    题解:P11754 [COCI 2024/2025 #5] 绘图 / Crtež

    关于P11754 [COCI 2024/2025 #5] 绘图/Crtež的解法,关键思路如下: 问题分析‌ 初始序列由-1间隔的0连续段组成,操作后要求互不等价的最终序列方案数。由于不同连续段互不影响,总方案数为各段方案数的乘积。 规律发现‌ 长度为1的连续段有3种方案:[0]…

  3. 题解

    题解:P3036 [USACO16DEC] Lasers and Mirrors G

    题目大意 给定激光器位置 ( x L , y L ) (x L ​ ,y L ​ ) 和谷仓位置 ( x B , y B ) (x B ​ ,y B ​ ), 以及 N N 个栅栏柱的位置。激光可以水平或垂直发射, 在栅栏柱上可以安装反射镜改变光束方向。求从激光器到谷仓所需的最少…

  4. 题解

    题解:P9814 [CCC 2015 S5] Greedy For Pies

    本文是洛谷 P9814 的题解,采用动态规划算法。主要步骤为:将两个输入序列合并后降序排序;定义 dp[i][0] 和 dp[i][1] 分别表示不选及选择第 i 个元素时的最大和;通过状态转移方程计算最终结果。文末附带了完整的 C++ 代码实现。

    2 赞
  5. 题解

    题解:P1408 互质数列sequence【数据疑似有误】

    本蒟蒻第一篇提解(求通过🤔) 分析 一个数列有 n 个数字,我们定义一种操作:我们可以将相邻 两个数字同时除以它们的一个公约数,这个操作所花费的代 价为作为除数的这个公约数的值。 我们可以将其理解为对两个数的质因数进行操作(即同时减一)。 思路 这道题可以运用动态规划的思想。 …

  6. 题解

    炮兵阵地

    这是本蒟蒻的第一篇题解,大佬勿喷,求管理员通过ing 题目传送门:- [P2704 [NOI2001] 炮兵阵地](https://www.luogu.com.cn/problem/P2704) 很明显这是一道典型的壮压dp 动态规划的常见思路就是描述不清楚状态就加一个维度。状态…