QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#287062#5090. 妙妙题CrysflyCompile Error//C++17732b2023-12-19 14:41:242023-12-19 14:41:25

Judging History

This is the latest submission verdict.

  • [2023-12-19 14:41:25]
  • Judged
  • [2023-12-19 14:41:24]
  • Submitted

answer

// what is matter? never mind. 
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
//#pragma GCC target("sse,sse2,sse3,sse4,popcnt,abm,mmx,avx,avx2") 
#include"tmp.h"
#include<bits/stdc++.h>
#define For(i,a,b) for(int i=(a);i<=(b);++i)
#define Rep(i,a,b) for(int i=(a);i>=(b);--i)
#define ll long long
//#define int long long
#define ull unsigned long long
using namespace std;

int n;
double x[66],y[66],pi=acos(-1.0);
void init(int N,bool Type,int p){
	n=N;
	For(i,0,n-1)x[i]=sin(2*pi*i/n),y[i]=cos(2*pi*i/n);
}
bool guess(ull A,int x){
	double sx=0,sy=0;
	int c=0;
	For(i,0,n-2){
		if(A>>i&1){
			++c;
			sx+=x[i],sy+=y[i];
		}
	}
	if(fabs(sy)>1e-7) return (sy>0)^(c&1);
	return 0;
}

详细

implementer.cpp: In function ‘int _JFIBEIIYTAFEUXOULOWO_::main()’:
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:26:30: error: invalid types ‘int[int]’ for array subscript
   26 |                         sx+=x[i],sy+=y[i];
      |                              ^