QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#101360#4913. 子集匹配lingchenCompile Error//C++14221b2023-04-29 11:30:472023-04-29 11:30:50

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-04-29 11:30:50]
  • 评测
  • [2023-04-29 11:30:47]
  • 提交

answer

#include "hall.h"
// #include "grader.cpp"

// bool b[1<<16];

int solve(int n,int K,int s)
{
	for(int i=0; i<n; i++)
	if(((s>>i)&1)&&!b[s^(1<<i)])
	{
		// b[s^(1<<i)]=1;
		return s^(1<<i);
	}
	return 0;
}

详细

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: In function ‘int solve(int, int, int)’:
answer.code:9:25: error: ‘b’ was not declared in this scope
    9 |         if(((s>>i)&1)&&!b[s^(1<<i)])
      |                         ^