QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#20260 | #3098. Ancient Machine | BuildNoMore | Compile Error | / | / | C++14 | 1.9kb | 2022-02-15 10:05:15 | 2023-01-17 10:42:19 |
Judging History
你现在查看的是最新测评结果
- [2023-08-10 23:21:45]
- System Update: QOJ starts to keep a history of the judgings of all the submissions.
- [2023-01-17 10:42:19]
- 评测
- 测评结果:Compile Error
- 用时:0ms
- 内存:0kb
- [2022-02-15 10:05:15]
- 提交
Anna
#include<bits/stdc++.h>
#define rep(i,x,y) for(int i=x;i<=y;++i)
#define per(i,x,y) for(int i=x;i>=y;--i)
#define vep(i,x) for(unsigned int i=0;i<x.size();++i)
#define mar(o) for(int E=fst[o];E;E=e[E].nxt)
#define v e[E].to
#define lon unsigned long long
using namespace std;
const int n7=101234;
lon f[123];int is[n7];
void Dfib(){
f[0]=1,f[1]=2;
rep(i,2,64){
f[i]=f[i-1]+f[i-2];
}
}
void Anna(int n,vector <char> a){
int wei=-1;
vep(i,a){
if(a[i]=='X'){
wei=i;
rep(j,0,15)Send(i&1),i>>=1;
break;
}
}
if(wei==-1){
rep(j,0,15)Send(1);
return;
}
rep(i,wei+1,n-1){
if(a[i]=='Z'&&a[i+1]^'Z')is[i]=1;
}
Dfib();
rep(i,wei+1,n-1){
int l=i,r=min(n-1,i+62);lon x=0,tot=0;
rep(j,l,r)if(is[j])x|=( 1<<(j-l) );
per(j,63,0){
if( x&(1ll<<j) )tot+=f[j];
}
rep(j,0,44)Send(tot&1),tot>>=1;
i=r;
}
}
Bruno
#include<bits/stdc++.h>
#define rep(i,x,y) for(int i=x;i<=y;++i)
#define per(i,x,y) for(int i=x;i>=y;--i)
#define vep(i,x) for(unsigned int i=0;i<x.size();++i)
#define mar(o) for(int E=fst[o];E;E=e[E].nxt)
#define v e[E].to
#define lon unsigned long long
using namespace std;
const int n7=101234;
lon f[123];int b[n7];
void Dfib(){
f[0]=1,f[1]=2;
rep(i,2,64){
f[i]=f[i-1]+f[i-2];
}
}
void Bruno(int n,int m,vector <int> a){
bool flag=0;
rep(i,0,15){
flag|=(a[i]==0);
}
if(!flag){
rep(i,0,n-1)Remove(i);
return;
}
int wei=0;
per(i,15,0){
wei=(wei<<1)+a[i];
}
Dfib();
rep(i,0,wei-1)Remove(i);
rep(i,16,m-1){
int l=i,r=min(m-1,i+44);lon x=0,tot=0;
per(j,r,l){
tot=(tot<<1)+a[j];
}
per(j,63,0){
if(tot>=f[j])x|=(1ll<<j),tot-=f[j];
}
rep(j,l,r){
if( x&( 1ll<<(j-l) ) )b[j-15]=1;
}
i=r;
}
int l=wei+1;
rep(i,wei,n-1){
if(b[i]){
per(j,i-1,l)Remove(j);
Remove(i),l=i+1;
}
}
rep(i,l,n-1)Remove(i);
Remove(wei);
}
Details
Anna.code: In function ‘void Anna(int, std::vector<char>)’: Anna.code:25:16: error: ‘Send’ was not declared in this scope 25 | rep(j,0,15)Send(i&1),i>>=1; | ^~~~ Anna.code:30:15: error: ‘Send’ was not declared in this scope 30 | rep(j,0,15)Send(1); | ^~~~ Anna.code:43:15: error: ‘Send’ was not declared in this scope 43 | rep(j,0,44)Send(tot&1),tot>>=1; | ^~~~