QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#394284#4913. 子集匹配chenyitaooooCompile Error//C++14260b2024-04-20 10:55:082024-04-20 10:55:09

Judging History

你现在查看的是最新测评结果

  • [2024-04-20 10:55:09]
  • 评测
  • [2024-04-20 10:55:08]
  • 提交

answer

#include<hall.h>
//#include<bits/stdc++.h>
using namespace std;
int solve(int n,int L,int s){
	int mi=0,wei=0,nw=0;
	for(int i=0; i<n; ++i){
		if((s>>i)&1) nw++;
		else nw--;
		if(nw<=mi) mi=nw,wei=i+1;
	}
	s^=(1<<wei);
	return s;
}
//int main(){}

詳細信息

implementer.cpp: In function ‘int main()’:
implementer.cpp:37:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   37 |         scanf("%d %d",&n,&K); assert(1<=n&&n<=27&&2*K>n);
      |         ~~~~~^~~~~~~~~~~~~~~
answer.code:1:9: fatal error: hall.h: No such file or directory
    1 | #include<hall.h>
      |         ^~~~~~~~
compilation terminated.