QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#833061 | #5090. 妙妙题 | PhNe# | Compile Error | / | / | C++14 | 2.2kb | 2024-12-26 12:41:36 | 2024-12-26 12:41:36 |
Judging History
This is the latest submission verdict.
- [2024-12-26 12:41:36]
- Judged
- Verdict: Compile Error
- Time: 0ms
- Memory: 0kb
- [2024-12-26 12:41:36]
- Submitted
answer
#include<map>
#include<set>
#include<ctime>
#include<cmath>
#include<queue>
#include<bitset>
#include<cstdio>
#include<vector>
#include<random>
#include<cstdlib>
#include<cstring>
#include<iostream>
#include<algorithm>
#define ll long long
using namespace std;
#define I ll
#define her1 20081214
#define IV void
#define cht 998244352
#define Mod 998244353
#define ld double
#define Aestas16 392699
#define ull unsigned long long
#define cp(x,y)memcpy(x,y,sizeof y)
#define mem(x,val)memset(x,val,sizeof x)
#define D(i,j,n)for(register int i=j;i>=n;i--)
#define E(i,now)for(register int i=first[now],v=e[i].to;i;v=e[i=e[i].nxt].to)
#define F(i,j,n)for(register int i=j;i<=n;i++)
#define DL(i,j,n)for(register i64 i=j;i>=n;i--)
#define EL(i,now)for(register i64 i=first[now];i;i=e[i].nxt)
#define FL(i,j,n)for(register i64 i=j;i<=n;i++)
#undef ll
#include "tmp.h"
#include "assert.h"
mt19937_64 rnd(her1);
#include "functional"
using i64 = int;
i64 v,n;bool flag;
IV init(i64 N,bool type,i64 p){
flag=0;n=N;
}
bool mat2[]={0,1,0,1,1,1,1,0,0,0,0,1,1,1,1,1,0,0,1,0,1,0,0,1,0,0,0,1,1,0,0,1,0};
bool mat[]={
0,0,1,1,0,1,1,1,1,1,1,0,0,0,1,0,1,0,0,0,0,1,0,1,0,0,1,0,1,1,1,1,0,1,1,1,0
,0,1,1,1,1,0,0,0,0,0,1,0,1,1,1,0,0,0,0,0,1,0,0,0,0,1,1,1};
bool guess(ull A,i64 x){
i64 c0=0,c1=0;
if(n==3){
if(A==0)return 0;
if(A==1)return 1;
if(A==2)return 0;
if(A==3)return 1;
}
if(n<=5){
A&=7;
if(A==0)return 0;
if(A==1)return 1;
if(A==2)return 0;
if(A==3)return 0;
if(A==4)return 1;
if(A==5)return 0;
if(A==6)return 1;
if(A==7)return 1;
}
if(n==6){
return mat2[A];
}
i64 c1=__builtin_popcount(A);
if(c1<n/3)return 0;if(c1>2*n/3)return 1;
A&=63;
return mat[A];
// i64 cnt=0,mx=0,mn=0;
// F(i,0,n-2){
// if(A>>i&1)mx=max(mx,++cnt);
// else mn=min(mn,--cnt);
// if(cnt<0)return 0;
// }
// return 1;
// i64 cnt=0;
// F(i,0,n-2)putchar((A>>i&1)+'0');puts("");
// F(i,0,n-2)if((A>>i&1)==(A&1))
// cnt++;else break;
// if(cnt&1)return 0;else return 1;
// if(!flag){
// }
// return v;
}
Details
implementer.cpp: In function ‘int _JFIBEIIYTAFEUXOULOWO_::main()’: implementer.cpp:31:22: warning: structured bindings only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions] 31 | auto [A,x,y,z]=V[i]; | ^ implementer.cpp:36:18: warning: structured bindings only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions] 36 | for(auto [A,x,y]:U) | ^ implementer.cpp:39:22: warning: structured bindings only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions] 39 | auto [A,x,y,z]=V[i]; | ^ implementer.cpp:18:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 18 | scanf("%d%d%d%d",&N,&Type,&p,&T); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ implementer.cpp:23:22: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 23 | scanf("%llu",&x); | ~~~~~^~~~~~~~~~~ answer.code: In function ‘bool guess(long long unsigned int, i64)’: answer.code:71:9: error: redeclaration of ‘i64 c1’ 71 | i64 c1=__builtin_popcount(A); | ^~ answer.code:50:14: note: ‘i64 c1’ previously declared here 50 | i64 c0=0,c1=0; | ^~