QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#96179#5090. 妙妙题c20230139Compile Error//C++17493b2023-04-13 16:12:012023-04-13 16:12:03

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 16:12:03]
  • Judged
  • [2023-04-13 16:12:01]
  • Submitted

answer

#include<bits/stdc++.h>
#include "tmp.h"
using namespace std;
const double pi=acos(-1),eps=1e-6;
double sin_[65],cos_[65];
int n;
void init(int N,int 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 tot=0;
	for(int i=1;i<n;i++) {
		if((a>>(i-1))&1ull) {
			tot^=1;
			s+=cos_[i];
			c+=sin_[i];
		}
	}
	if(fabs(c)<eps) return 0;
	return tot^(c>0);
}
int main() {
	
}

Details

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);
      |                 ~~~~~^~~~~~~~~~~
/usr/bin/ld: /tmp/ccDcy36S.o: in function `main':
answer.code:(.text.startup+0x0): multiple definition of `main'; /tmp/ccF5mfzP.o:implementer.cpp:(.text.startup+0x700): first defined here
/usr/bin/ld: /tmp/ccF5mfzP.o: in function `_JFIBEIIYTAFEUXOULOWO_::main()':
implementer.cpp:(.text.startup+0x6f): undefined reference to `init(int, bool, int)'
collect2: error: ld returned 1 exit status