QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#520320#5447. 鸽子NOI_AK_MECompile Error//C++23523b2024-08-15 12:51:512024-08-15 12:51:51

Judging History

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

  • [2024-08-15 12:51:51]
  • 评测
  • [2024-08-15 12:51:51]
  • 提交

answer

#import<bits/stdc++.h>
#define rep(i,j,k)for(int i=j;i<=k;++i)
std::map<int,__uint128_t>A;int ID;extern"C" int pigeon_num(int Taskid,int k){return 22*k+11;}extern"C" std::string send(int Taskid,int n,int k,__uint128_t msg){std::string s="";A[++ID]=msg;rep(i,0,10){rep(i,0,k-1)s+="0";s+=(ID>>i&1LL)?"1":"0";rep(i,0,k-1)s+="0";}return s;}extern"C" __uint128_t receive(int Taskid,int k,const std::string&msg){__uint128_t ans=0,res=1;rep(i,0,10){rep(j,i*(2*k+1),i*(2*k+1)+(k<<1))ans+=res*(msg[j]==49);res<<=1;}return A[ans];}

詳細信息

answer.code:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
    1 | #import<bits/stdc++.h>
      |  ^~~~~~
/usr/bin/ld: /tmp/cc0IyOQV.o: in function `main':
implementer.cpp:(.text.startup+0x38e): undefined reference to `pigeon_num(int, int)'
/usr/bin/ld: implementer.cpp:(.text.startup+0x3e3): undefined reference to `send[abi:cxx11](int, int, int, unsigned __int128)'
/usr/bin/ld: implementer.cpp:(.text.startup+0x833): undefined reference to `receive(int, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
collect2: error: ld returned 1 exit status