QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#394349#4913. 子集匹配OccDreamerCompile Error//C++14251b2024-04-20 13:30:472024-04-20 13:30:48

Judging History

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

  • [2024-04-20 13:30:48]
  • 评测
  • [2024-04-20 13:30:47]
  • 提交

answer

#include<hall.h>
#include<bits/stdc++.h>

using namespace std;

int solve(int n,int K,int s){
	int now=0, Min=0, pos=-1;
	for(int i=0;i<n;++i){
		if((s>>i)&1) ++now;
		else --now;
		if(now<Min) Min=now, pos=i;
	}
	return s^(1<<(pos+1));
}

Details

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.