QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#85852 | #5689. 喵了个喵 II | feecle6418 | Compile Error | / | / | Python3 | 843b | 2023-03-08 17:54:33 | 2023-03-08 17:54:34 |
Judging History
你现在查看的是最新测评结果
- [2023-08-10 23:21:45]
- System Update: QOJ starts to keep a history of the judgings of all the submissions.
- [2023-03-08 17:54:34]
- 评测
- 测评结果:Compile Error
- 用时:0ms
- 内存:0kb
- [2023-03-08 17:54:33]
- 提交
answer
#include<bits/stdc++.h>
const int N=200005;
using namespace std;
int n;
int a[N];
int cc[N];
int fl[N];
int A[N],cnt,nw;
void dfs(int k){
if(1.*clock()/CLOCKS_PER_SEC>=2.8){
cout<<"No"<<endl;
exit(0);
}
if(k==n*4+1){
cout<<"Yes"<<endl;
for(int i=1;i<=n<<2;i++)
cout<<fl[i];
exit(0);
}
if(A[nw+1]==a[k]&&nw<cnt){
nw++;
dfs(k+1);
nw--;
}
if(cnt==n*2)return ;
if(cc[a[k]]==2)return ;
cc[a[k]]++;
fl[k]=1;
A[++cnt]=a[k];
dfs(k+1);
cc[a[k]]--;
cnt--;
fl[k]=0;
}
void solve(){
cin>>n;
for(int i=1;i<=n*4;i++)
cin>>a[i];
dfs(1);
cout<<"No"<<endl;
}
main(){
ios::sync_with_stdio(0);
int _T=1;//cin>>_T;
while(_T--)solve();
}
Details
File "answer.code", line 2 const int N=200005; ^^^ SyntaxError: invalid syntax