<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta>
<title>666</title>
</head>
<body>
<iframe src="https://www.luogu.com.cn/problem/P1001" style="width: 1580px; height: 730px;" id="i"></iframe>
<script>
setTimeout(() => {
var u = document.getElementById('i');
fetch("a.txt");//.then(text => {/*u.src = `https://www.luogu.com.cn/problem/P${response}`;*/});
//u.src = `https://www.luogu.com.cn/problem/P${text}`;//text = "gsfg";
//window.location.href = window.location.href;
}, 5000);
</script>
</body>
</html>本段严禁模仿:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="refresh" content="10">
<title>666</title>
</head>
<body>
<iframe src="" style="width: 1580px; height: 730px;" id="i"></iframe>
<script>
document.addEventListener('keyup', (event) => {
console.log(event.key);
if (event.key === "@")
localStorage.setItem('num', 1000);
});
var k = localStorage.getItem('num');
var u = document.getElementById('i');
if (k === null)
localStorage.setItem('num', 1000);
else {
k = Number(k);
k += 1;
u.src = `https://www.luogu.com.cn/problem/P${k}`;
localStorage.setItem('num', k);
}
</script>
</body>
</html><!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>6</title>
</head>
<body>
<p id="p1"></p>
<p id="p2"></p>
<input id="i1">
<input id="i2">
<script>
var p = document.getElementById('p');
var i = document.getElementById('i');
var username = localStorage.getItem('username');
var password = localStorage.getItem('password');
p.textContent = username;
document.addEventListener('keyup', (event) => {
if (event.key === 'Enter' || event.keyCode === 13) {
p.textContent = i.value;
localStorage.setItem('username', i.value);
}
});
</script>
</body>
</html>附上写了一半的离散化:
#include<bits/stdc++.h>
using namespace std;
struct zan
{
int x;
int c;
};
zan a[1000001];
bool cmp(const zan &x,const zan &y)
{
return x.x<y.x;
}
struct wen
{
int l;
int r;
};
wen b[1000001];
int main()
{
int n,m;
cin>>n>>m;
for(int i=1;i<=n;i++)
{
cin>>a[i].x>>a[i].c;
}
sort(a+1,a+n+1,cmp);
for(int j=1;j<=m;j++)
{
cin>>b[j].l>>b[j].r;
}
}