제출 #1168068

#제출 시각아이디문제언어결과실행 시간메모리
1168068Faisal_Saqib새로운 문제 (POI13_spa)C++17
컴파일 에러
0 ms0 KiB
#include <bitset> #include <iostream> #include <map> #include <queue> using namespace std; #define ll long long int n,k; char c; ll asp=0; // 10000000040 bitset<20000000040> banned; ll read() { asp=0; for(int i=0;i<n;i++) { cin>>c; asp<<=1; asp+=c-'0'; } return asp; } ll gcost(ll x,ll y) { return __builtin_popcountll(x^y); } int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); cin>>n>>k; ll st=read(),ed=read(); for(int i=0;i<k;i++) { banned[read()]=1; } queue<ll>pq; banned[st]=1; pq.push(st); ll op=0; while(pq.size()) { ll x=pq.front(); pq.pop(); op++; if(x==ed) { cout<<"TAK"<<endl; return 0; } if(op*n >= 1e9) { break; } ll pw=1; for(int bi=0;bi<n;bi++) { ll y=x^pw; if(!banned[y]) { banned[y]=1; pq.push(y); } pw<<=1; } } cout<<"NIE"<<endl; return 0; }

컴파일 시 표준 에러 (stderr) 메시지

/tmp/ccO5Opvy.o: in function `read()':
spa.cpp:(.text+0x86): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccO5Opvy.o
spa.cpp:(.text+0x8d): relocation truncated to fit: R_X86_64_PC32 against symbol `asp' defined in .bss section in /tmp/ccO5Opvy.o
spa.cpp:(.text+0x9e): relocation truncated to fit: R_X86_64_PC32 against symbol `c' defined in .bss section in /tmp/ccO5Opvy.o
spa.cpp:(.text+0xa6): relocation truncated to fit: R_X86_64_PC32 against symbol `std::cin' defined in .bss._ZSt3cin section in /usr/lib/gcc/x86_64-linux-gnu/11/libstdc++.a(globals_io.o)
spa.cpp:(.text+0xc1): relocation truncated to fit: R_X86_64_PC32 against symbol `c' defined in .bss section in /tmp/ccO5Opvy.o
spa.cpp:(.text+0xc8): relocation truncated to fit: R_X86_64_PC32 against symbol `asp' defined in .bss section in /tmp/ccO5Opvy.o
spa.cpp:(.text+0xd1): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccO5Opvy.o
spa.cpp:(.text+0xde): relocation truncated to fit: R_X86_64_PC32 against symbol `asp' defined in .bss section in /tmp/ccO5Opvy.o
/tmp/ccO5Opvy.o: in function `main':
spa.cpp:(.text.startup+0x1c): relocation truncated to fit: R_X86_64_PC32 against symbol `c' defined in .bss section in /tmp/ccO5Opvy.o
spa.cpp:(.text.startup+0x24): relocation truncated to fit: R_X86_64_PC32 against symbol `std::cin' defined in .bss._ZSt3cin section in /usr/lib/gcc/x86_64-linux-gnu/11/libstdc++.a(globals_io.o)
spa.cpp:(.text.startup+0x47): additional relocation overflows omitted from the output
/usr/lib/gcc/x86_64-linux-gnu/11/libstdc++.a(ios_init.o): in function `std::ios_base::Init::Init()':
(.text._ZNSt8ios_base4InitC2Ev+0x1c): failed to convert GOTPCREL relocation against '_ZNSt8ios_base4Init11_S_refcountE'; relink with --no-relax
(.text._ZNSt8ios_base4InitC2Ev+0x1c6): failed to convert GOTPCREL relocation against '_ZSt4cout'; relink with --no-relax
(.text._ZNSt8ios_base4InitC2Ev+0x260): failed to convert GOTPCREL relocation against '_ZSt3cin'; relink with --no-relax
(.text._ZNSt8ios_base4InitC2Ev+0x2e2): failed to convert GOTPCREL relocation against '_ZSt4cerr'; relink with --no-relax
(.text._ZNSt8ios_base4InitC2Ev+0x353): failed to convert GOTPCREL relocation against '_ZSt4clog'; relink with --no-relax
(.text._ZNSt8ios_base4InitC2Ev+0x541): failed to convert GOTPCREL relocation against '_ZSt5wcout'; relink with --no-relax
(.text._ZNSt8ios_base4InitC2Ev+0x5e5): failed to convert GOTPCREL relocation against '_ZSt4wcin'; relink with --no-relax
(.text._ZNSt8ios_base4InitC2Ev+0x670): failed to convert GOTPCREL relocation against '_ZSt5wcerr'; relink with --no-relax
(.text._ZNSt8ios_base4InitC2Ev+0x6e9): failed to convert GOTPCREL relocation against '_ZSt5wclog'; relink with --no-relax
collect2: error: ld returned 1 exit status