QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#99118 | #6308. Magic | DrGilbert | Compile Error | / | / | C++20 | 670b | 2023-04-21 11:12:10 | 2023-04-21 11:12:14 |
Judging History
你现在查看的是最新测评结果
- [2023-08-10 23:21:45]
- System Update: QOJ starts to keep a history of the judgings of all the submissions.
- [2023-04-21 11:12:14]
- 评测
- 测评结果:Compile Error
- 用时:0ms
- 内存:0kb
- [2023-04-21 11:12:10]
- 提交
answer
#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
const int N=5010;
int l[N],r[N],mat[N];
bitset<N> G[N],vis;
bool dfs(int x){
bitset<N> tmp=vis&G[x];
for (int v=tmp._Find_first();v<N;v=tmp._Find_next(v)){
vis[v]=0;if (!mat[v]||dfs(mat[v])) return mat[v]=u;
}return 0;
}
int main(){
ios::sync_with_stdio(0);
cin.tie(nullptr);cout.tie(nullptr);
int n;cin>>n;
for (int i=1;i<=n;i++) cin>>L[i]>>R[i];
for (int i=1;i<=n;i++){
for (int j=1;j<=n;j++){
if (l[i]<l[j]&&l[j]<r[i]&&r[i]<r[j]){
G[j][i]=1;
}
}
}int ans=2*n;
for (int i=1;i<=n;i++){
vis.set();ans-=dfs(i);
}cout<<ans<<endl;return 0;
}
Details
answer.code: In function ‘bool dfs(int)’: answer.code:10:66: error: ‘u’ was not declared in this scope 10 | vis[v]=0;if (!mat[v]||dfs(mat[v])) return mat[v]=u; | ^ answer.code: In function ‘int main()’: answer.code:17:37: error: ‘L’ was not declared in this scope 17 | for (int i=1;i<=n;i++) cin>>L[i]>>R[i]; | ^ answer.code:17:43: error: ‘R’ was not declared in this scope 17 | for (int i=1;i<=n;i++) cin>>L[i]>>R[i]; | ^