QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#96331#5090. 妙妙题st20230603Compile Error//C++14519b2023-04-13 19:43:302023-04-13 19:43:34

Judging History

This is the latest submission verdict.

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-04-13 19:43:34]
  • Judged
  • [2023-04-13 19:43:30]
  • Submitted

answer

#include<bits/stdc++.h>
#include "tmp.h"
using namespace std;
const int  N=2e5+10;
const double pai=acos(-1),eps=1e-8;
double Sin[N],Cos[N];
int n;
void init(int N,bool opt,int p) {
	n=N;
	for(int i=1;i<n;i++) Cos[i]=cos(2*pi*i/n),Sin[i]=sin(2*pi*i/n);
}
bool guess(unsigned long long a,int x) {
	double s=0,c=0;
	int cnt=0;
	for(unsigned long long i=1;(int)i<n;i++) {
		if((a>>(i-1))&1) {
			cnt^=1;
			s+=Cos[i];
			c+=Sin[i];
		}
	}
	if(fabs(c)<eps) return (fabs(s)>=eps);
	return cnt^(c>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’
   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’
   36 |         for(auto [A,x,y]:U)
      |                  ^
implementer.cpp:39:22: warning: structured bindings only available with ‘-std=c++17’ or ‘-std=gnu++17’
   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:10:43: error: ‘pi’ was not declared in this scope; did you mean ‘i’?
   10 |         for(int i=1;i<n;i++) Cos[i]=cos(2*pi*i/n),Sin[i]=sin(2*pi*i/n);
      |                                           ^~
      |                                           i