QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#394298#4913. 子集匹配juruoACompile Error//C++14248b2024-04-20 11:08:352024-04-20 11:08:36

Judging History

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

  • [2024-04-20 11:08:36]
  • 评测
  • [2024-04-20 11:08:35]
  • 提交

answer

#include "hall.h"
#include <cstio>
typedef long long li;
li solve(li n, li k, li s){
	li p = -1, w = 0, pw = 0;
	for(li i = 0; i < n; i++){
		if((s >> i) & 1) w--;
		else w++;
		if(w >= pw) pw = w, p = i;
	}
	return s ^ (1 << (p + 1));
}

詳細信息

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:2:10: fatal error: cstio: No such file or directory
    2 | #include <cstio>
      |          ^~~~~~~
compilation terminated.