QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#326102 | #3098. Ancient Machine | NATURAL6 | Compile Error | / | / | C++14 | 1.8kb | 2024-02-12 11:51:19 | 2024-02-12 11:51:20 |
Judging History
Anna
#include "Anna.h"
#include<bits/stdc++.h>
using namespace std;
namespace ANNA
{
const int MAXN = 1e5, W = 63, B = 44;
int n,p;
vector<char>s;
int b[100010];
unsigned long long a[64],sxc;
inline void solve()
{
p=0;
while(p<n&&s[p]!='X')++p;
b[p]=1;
for(int i=p+1;i<n;++i)
{
while(i<n&&s[i]!='Z')++i;
while(i+1<n&&s[i+1]=='Z')++i;
if(p>=n||i>=n)break;
b[i+1]=1;
}
a[0]=1,a[1]=2;
for(int i=2;i<=63;++i)a[i]=a[i-1]+a[i-2];
for(int i=0;i<=n;i+=63)
{
sxc=0;
for(int j=i;j<=i+63-1;++j)if(b[j])sxc+=a[i+63-1-j];
for(int j=0;j<B;++j)Send(sxc>>j&1);
}
return ;
}
}
void Anna(int n,vector<char>s)
{
ANNA::n=n,ANNA::s=s;
ANNA::solve();
return ;
}
Bruno
#include "Bruno.h"
#include<bits/stdc++.h>
namespace BRUNO
{
int n,p;
vector<int>sbs;
int b[100010];
unsigned long long a[64],sxc;
inline void solve()
{
a[0]=1,a[1]=2;
for(int i=2;i<=63;++i)a[i]=a[i-1]+a[i-2];
for(int i=0,l,r;i<(int)sbs.size();i+=44)
{
sxc=0;
for(int j=i+43;j>=i;--j)sxc=sxc<<1|sbs[j];
l=i/44*63,r=l+62;
for(int j=l;j<=r;++j)if(sxc>=a[r-j])b[j]=1,sxc-=a[r-j];
}
p=0;
while(p<n&&!b[p])Remove(p++);
if(p==n)return ;
for(int i=p+1,lp=p;i<n;++i)
{
while(i<n&&!b[i+1])++i;
for(int j=i-1;j>=lp+1;--j)Remove(j);
if(i<n)Remove(lp=i++);
}
Remove(p);
}
}
void Bruno(int n,int l,vector<int>SXC)
{
BRUNO::n=n,BRUNO::sbs=SXC;
BRUNO::solve();
return ;
}
Details
Bruno.code:6:5: error: ‘vector’ does not name a type 6 | vector<int>sbs; | ^~~~~~ Bruno.code: In function ‘void BRUNO::solve()’: Bruno.code:13:32: error: ‘sbs’ was not declared in this scope; did you mean ‘abs’? 13 | for(int i=0,l,r;i<(int)sbs.size();i+=44) | ^~~ | abs Bruno.code: At global scope: Bruno.code:32:24: error: ‘vector’ has not been declared 32 | void Bruno(int n,int l,vector<int>SXC) | ^~~~~~ Bruno.code:32:30: error: expected ‘,’ or ‘...’ before ‘<’ token 32 | void Bruno(int n,int l,vector<int>SXC) | ^ Bruno.code: In function ‘void Bruno(int, int, int)’: Bruno.code:34:23: error: ‘sbs’ is not a member of ‘BRUNO’ 34 | BRUNO::n=n,BRUNO::sbs=SXC; | ^~~ Bruno.code:34:27: error: ‘SXC’ was not declared in this scope 34 | BRUNO::n=n,BRUNO::sbs=SXC; | ^~~