QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#499228 | #5090. 妙妙题 | lefy | Compile Error | / | / | C++14 | 568b | 2024-07-31 09:46:32 | 2024-07-31 09:46:32 |
Judging History
This is the latest submission verdict.
- [2024-07-31 09:46:32]
- Judged
- Verdict: Compile Error
- Time: 0ms
- Memory: 0kb
- [2024-07-31 09:46:32]
- Submitted
answer
#include<bits/stdc++.h>
#define ull unsigned long long
#define ld long double
#include "tmp.h"
using namespace std;
const int N=70;
const ld pi=acos(-1.0),eps=1e-7;
int n;
ld x[N],y[N];
void init(int nn,bool ty,int p){
n=nn;
for(int i=0;i<n;i++)x[i]=cos(2*pi/n*i),y[i]=sin(2*pi/n*i);
}
bool guess(ull S,int x){
ld X=0,Y=0;int cnt=0;
for(int i=0;i<n-1;i++)if((S>>i)&1)X+=x[i+1],Y+=y[i+1],cnt++;
if(Y>eps){
return (cnt&1)^1;
}else if(Y<-eps){
return cnt&1;
}else if(fabs(X)<=eps)return 0;
return 1;
}
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, int)’: answer.code:16:43: error: invalid types ‘int[int]’ for array subscript 16 | for(int i=0;i<n-1;i++)if((S>>i)&1)X+=x[i+1],Y+=y[i+1],cnt++; | ^