QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#473840 | #5090. 妙妙题 | zyxawa | Compile Error | / | / | C++14 | 476b | 2024-07-12 14:32:13 | 2024-07-12 14:32:14 |
Judging History
This is the latest submission verdict.
- [2024-07-12 14:32:14]
- Judged
- Verdict: Compile Error
- Time: 0ms
- Memory: 0kb
- [2024-07-12 14:32:13]
- Submitted
answer
#include<bits/stdc++.h>
#include"tmp.h"
using namespace std;
const double pi=acos(-1),eps=1e-8;
double s[65],c[65];
int n;
void init(int m,bool t,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;
for(int i=1;i<n;i++) if(a>>(i-1)&1) x+=s[i],y+=c[i];
if(fabs(x)<=eps&&fabs(y)<=eps) return 0;
if((fabs(x-1)<=eps||fabs(x+1)<=eps)&&fabs(y)<=eps) return 1;
return fabs(y)>0;
}
詳細信息
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 ‘void init(int, bool, int)’: answer.code:9:26: error: expected ‘)’ before ‘;’ token 9 | for(int i=1;;i<=n;i++) s[i]=sin(2*pi*i/n),c[i]=cos(2*pi*i/n); | ~ ^ | ) answer.code:9:27: error: ‘i’ was not declared in this scope 9 | for(int i=1;;i<=n;i++) s[i]=sin(2*pi*i/n),c[i]=cos(2*pi*i/n); | ^ answer.code: In function ‘bool guess(long long unsigned int, int)’: answer.code:12:16: error: declaration of ‘double x’ shadows a parameter 12 | double x=0,y=0; | ^ answer.code:11:37: note: ‘int x’ previously declared here 11 | bool guess(unsigned long long a,int x){ | ~~~~^