QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#474138 | #5090. 妙妙题 | sumi007 | Compile Error | / | / | C++14 | 539b | 2024-07-12 16:19:10 | 2024-07-12 16:19:13 |
Judging History
This is the latest submission verdict.
- [2024-07-12 16:19:13]
- Judged
- Verdict: Compile Error
- Time: 0ms
- Memory: 0kb
- [2024-07-12 16:19:10]
- Submitted
answer
#include <bits/stdc++.h>
using namespace std;
#define ull unsigned long long
#define ldb long double
const int N = 77;
const double Pi = acos(-1.0);
int n,a[N];
ldb x[N],y[N];
void init(int N ,bool Type ,int p){
n = N;
for(int i=1;i<n;i++) x[i] = sin(2.0*i*Pi/n),y[i] = cos(2.0*i*Pi/n);
}
bool guess(ull A,int X){
ldb a = 0,b = 0;bool s = 0;
for(int i=0;i+1<n;i++) if((A>>i)&1) a += x[i+1],b += y[i+1],s ^= 1;
if(fabs(a)<eps && fabs(b)<eps) return 0;
if(fabs(a)<eps) return 1;
if(x>0) return (s^1);
return s;
}
详细
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:20: error: ‘eps’ was not declared in this scope 16 | if(fabs(a)<eps && fabs(b)<eps) return 0; | ^~~ answer.code:17:20: error: ‘eps’ was not declared in this scope 17 | if(fabs(a)<eps) return 1; | ^~~ answer.code:18:13: error: ordered comparison of pointer with integer zero (‘long double*’ and ‘int’) 18 | if(x>0) return (s^1); | ~^~