QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#474101 | #5090. 妙妙题 | OFforest_1273 | Compile Error | / | / | C++14 | 861b | 2024-07-12 16:07:00 | 2024-07-12 16:07:00 |
Judging History
This is the latest submission verdict.
- [2024-07-12 16:07:00]
- Judged
- Verdict: Compile Error
- Time: 0ms
- Memory: 0kb
- [2024-07-12 16:07:00]
- Submitted
answer
#include<bits/stdc++.h>
#include "tmp.h"
using namespace std;
char buf[1<<23],*p1=buf,*p2=buf;
#define getchar() (p1==p2&&(p2=(p1=buf)+fread(buf,1,1<<21,stdin),p1==p2)?EOF:*p1++)
template <typename T> inline void read(T &x){x=0;int f=1;char c=getchar();while(c<'0'||c>'9'){if(c=='-')f*=-1;c=getchar();}while(c>='0'&&c<='9')x=(x<<1)+(x<<3)+(c^48),c=getchar();x*=f;}
template <typename T> inline void write(T x){if(x>9)write(x/10);putchar(x%10+'0');}
const int N=65;
constexpr long double pi=acos(-1.0),eps=1e-8;
int n,s[N],c[N];
void init(int m,bool type,int p){
n=m;
for(int i=1;i<=n;++i)s[i]=sin(2*pi*i/n),c[i]=cos(2*pi*i/n);
}
bool guess(unsigned long long a,int x){
double x=0,y=0;
int m=0;
for(int i=1;i<n;++i)if((a>>(i-1))&1)x+=c[i],y+=s[i],m^=1;
if(fabs(x)<eps&&fabs(y)<eps)return 0;
if(fabs(y)<eps)return 1;
return (y>0)^m;
}
详细
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, int)’: answer.code:16:16: error: declaration of ‘double x’ shadows a parameter 16 | double x=0,y=0; | ^ answer.code:15:37: note: ‘int x’ previously declared here 15 | bool guess(unsigned long long a,int x){ | ~~~~^