Submission #1097368

#TimeUsernameProblemLanguageResultExecution timeMemory
1097368vjudge1Genetics (BOI18_genetics)C++17
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> #define ll long long using namespace std; int n,m,k; ll conststring[5000],Sum,pos[70][50005000]; string xau[5000]; mt19937 rd(chrono::steady_clock::now().time_since_epoch().count()); #define rand rd ll Rand(ll l,ll h) { assert(l <= h); return l + rd() * 1LL * rd() % (h - l + 1); } void Solve() { for(int i=1;i<=n;i++) { ll tong=0; for(int j=1;j<=m;j++) { tong+=pos[xau[i][j]-'A'][j]-conststring[i]; } if(tong==(Sum-conststring[i])*(m-k)) { cout<<i; return; } } } void Input() { cin>>n>>m>>k; Sum=0; for(int i=1;i<=n;i++) { cin>>xau[i]; xau[i]=" "+xau[i]; conststring[i]=abs(Rand(78,1000000)); Sum+=conststring[i]; for(int j=1;j<=m;j++) { pos[xau[i][j]-'A'][j]+=conststring[i]; } } } int main() { Input(); Solve(); }

Compilation message (stderr)

/tmp/ccmeqpk4.o: in function `Solve()':
genetics.cpp:(.text+0x5f): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccmeqpk4.o
genetics.cpp:(.text+0x70): relocation truncated to fit: R_X86_64_PC32 against symbol `m' defined in .bss section in /tmp/ccmeqpk4.o
genetics.cpp:(.text+0x77): relocation truncated to fit: R_X86_64_PC32 against symbol `Sum' defined in .bss section in /tmp/ccmeqpk4.o
genetics.cpp:(.text+0x8b): relocation truncated to fit: R_X86_64_PC32 against symbol `conststring' defined in .bss section in /tmp/ccmeqpk4.o
genetics.cpp:(.text+0x9a): relocation truncated to fit: R_X86_64_PC32 against symbol `k' defined in .bss section in /tmp/ccmeqpk4.o
genetics.cpp:(.text+0x12b): relocation truncated to fit: R_X86_64_PC32 against symbol `std::cout' defined in .bss._ZSt4cout section in /usr/lib/gcc/x86_64-linux-gnu/10/libstdc++.a(globals_io.o)
/tmp/ccmeqpk4.o: in function `Input()':
genetics.cpp:(.text+0x1b9): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccmeqpk4.o
genetics.cpp:(.text+0x1c0): 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/10/libstdc++.a(globals_io.o)
genetics.cpp:(.text+0x1e8): relocation truncated to fit: R_X86_64_PC32 against symbol `m' defined in .bss section in /tmp/ccmeqpk4.o
genetics.cpp:(.text+0x1f7): relocation truncated to fit: R_X86_64_PC32 against symbol `k' defined in .bss section in /tmp/ccmeqpk4.o
genetics.cpp:(.text+0x205): additional relocation overflows omitted from the output
/usr/bin/ld: failed to convert GOTPCREL relocation; relink with --no-relax
collect2: error: ld returned 1 exit status