QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#487115 | #5090. 妙妙题 | maojun | Compile Error | / | / | C++23 | 1.4kb | 2024-07-22 16:31:35 | 2024-07-22 16:31:36 |
Judging History
This is the latest submission verdict.
- [2024-07-22 16:31:36]
- Judged
- Verdict: Compile Error
- Time: 0ms
- Memory: 0kb
- [2024-07-22 16:31:35]
- Submitted
answer
#include<bits/stdc++.h>
#include"tmp.h"
#define CHECKER
using namespace std;
typedef double db;
const db pi=acos(-1),eps=1e-7;
void init(int N,int Type,int p){
}
bool guess(unsigned long long A,int x){
return 0;
}
#ifdef CHECKER
#define ull unsigned long long
namespace TMP{
std::mt19937 rng(510);
int N,Type,p,T;
std::vector<std::tuple<ull,int,int,int>> V;
std::vector<std::tuple<ull,int,int>> U;
int F[64<<16];
int C[1<<16];
int main(){
scanf("%d%d%d%d",&N,&Type,&p,&T);
init(N,Type,p);
V.reserve(T*N);
for(int t=0;t<T;t++){
ull x;
scanf("%llu",&x);
for(int i=0;i<N;i++){
V.emplace_back(x>>1,Type?i:-1,x&1,t);
x=x>>1|(x&1)<<(N-1);
}
}
std::sort(V.begin(),V.end());
for(int i=0;i<(int)V.size();i++){
auto [A,x,y,z]=V[i];
if(!i||A!=std::get<0>(V[i-1])||x!=std::get<1>(V[i-1]))
U.emplace_back(A,x,i);
}
std::shuffle(U.begin(),U.end(),rng);
for(auto [A,x,y]:U)
F[y]=guess(A,x);
for(int i=0,tmp=0;i<(int)V.size();i++){
auto [A,x,y,z]=V[i];
if(!i||A!=std::get<0>(V[i-1])||x!=std::get<1>(V[i-1]))
tmp=F[i];
C[z]+=tmp==y;
}
std::sort(C,C+T);
printf("%d\n",C[p-1]);
for(int k=2;k<=N-1;k++) if(C[p-1]>=(N-1)/k){
printf("%lf\n",1./pow(k-1,1.5));
return 0;
}
puts("0");
return 0;
}
}
int main(){
return TMP::main();
}
#endif
詳細信息
implementer.cpp: In function ‘int _JFIBEIIYTAFEUXOULOWO_::main()’: implementer.cpp:18:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 18 | scanf("%d%d%d%d",&N,&Type,&p,&T); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ implementer.cpp:23:22: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 23 | scanf("%llu",&x); | ~~~~~^~~~~~~~~~~ answer.code: In function ‘int TMP::main()’: answer.code:31:22: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 31 | scanf("%d%d%d%d",&N,&Type,&p,&T); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ answer.code:36:30: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 36 | scanf("%llu",&x); | ~~~~~^~~~~~~~~~~ /usr/bin/ld: /tmp/ccLNvUIY.o: in function `main': answer.code:(.text.startup+0x9c0): multiple definition of `main'; /tmp/cc0bC9KW.o:implementer.cpp:(.text.startup+0x9d0): first defined here /usr/bin/ld: /tmp/cc0bC9KW.o: in function `_JFIBEIIYTAFEUXOULOWO_::main()': implementer.cpp:(.text.startup+0x65): undefined reference to `init(int, bool, int)' collect2: error: ld returned 1 exit status