QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#394389 | #4913. 子集匹配 | biuld | Compile Error | / | / | C++14 | 511b | 2024-04-20 14:13:10 | 2024-04-20 14:13:10 |
Judging History
answer
#include<bits/stdc++.h>
#include"hall.h"
using namespace std;
int solve(int n, int k, int S){
int mn = 0, p = 0, now = 0;
for(int i = 1; i <= n; ++ i){
if((S >> (n - i)) & 1){
now ++;
}
else{
now --;
}
if(now < mn){
mn = now;
p = i;
}
}
int ans = 0;
for(int i = 1; i <= n; ++ i){
if(i - 1 == p){
// ans += (1 << (n - i));
continue;
}
else if((S >> (n - i) & 1)){
ans += (1 << (n - i));
}
}
return ans;
}
int main(){
return 0;
}
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); | ~~~~~^~~~~~~~~~~~~~~ /usr/bin/ld: /tmp/ccSAe6xU.o: in function `main': answer.code:(.text.startup+0x0): multiple definition of `main'; /tmp/cc5b0s9S.o:implementer.cpp:(.text.startup+0x0): first defined here collect2: error: ld returned 1 exit status