QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#670619 | #8780. Training, Round 2 | myloveATRI | Compile Error | / | / | C++20 | 1.8kb | 2024-10-23 22:35:31 | 2024-10-23 22:35:45 |
Judging History
This is the latest submission verdict.
- [2024-10-23 22:35:45]
- Judged
- Verdict: Compile Error
- Time: 0ms
- Memory: 0kb
- [2024-10-23 22:35:31]
- Submitted
answer
#include<bits/stdc++.h>
#include<queue>
#include<string.h>
#include<iostream>
#include<map>
#include<vector>
#include<algorithm>
#define int long long
#define ll long long
#define ull unsigned long long
#define rep(i,a,b) for(int i=a;i<=b;i++)
#define nl t[n].l
#define nr t[n].r
#define gcd __gcd
#define itn int
using namespace std;
const int maxn=1e6+50;
const int N=1e5+50;
const int inf=31525197391593473;
const int INF=2e18;
const int mod=998244353;
const double eps=1e-12;
#define pop_count __builtin_popcountll
//const ull mask = std::chrono::steady_clock::now().time_since_epoch().count();
int a[maxn],b[maxn],c[maxn],d[maxn];
set<int> s1[5005],s2[5005];
void solve()
{
int n,k1,k2;
cin>>n>>k1>>k2;
rep(i,1,n)
{
cin>>a[i]>>b[i]>>c[i]>>d[i];
}
f[0][0]=1;
int ans=0;
map<array<int,2>,int> mp;
s1[0].insert(0);
mp[{0,0}]=1;
rep(i,1,n)
{
rep(o,0,n)
{for(auto x:s1[o])
{
int j=o,k=x;
// cout<<j<<' '<<k<<'\n';
if(k1+j>=a[i]&&k1+j<=b[i]&&k2+k>=c[i]&&k2+k<=d[i])
{
ans=max(ans,j+k+1);
if(!mp[{j,k+1}])
{
mp[{j,k+1}]++;
s2[o].insert(k+1);
}
if(!mp[{j+1,k}])
{
mp[{j+1,k}]++;
s2[o+1].insert({j+1,k});
}
}
else s2[o].insert({j,k});
}
swap(s1[o],s2[o]);
s2[o].clear();
}
}
cout<<ans;
}
signed main()
{
ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
int __=1;
srand((time(0)));
//cin>>__;
while(__--)
{
solve();
}
return 0;
}
详细
answer.code: In function ‘void solve()’: answer.code:35:4: error: ‘f’ was not declared in this scope 35 | f[0][0]=1; | ^