QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#290950 | #5089. 环覆盖 | zzzYheng | Compile Error | / | / | C++17 | 797b | 2023-12-25 22:00:56 | 2023-12-25 22:00:57 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
const int kMaxN = 26;
const int kMaxM = 50;
const int kMaxPowN = (1 << 25) + 1;
const int kMod = 1e9 + 7;
int n, m;
int u[kMaxM], v[kMaxM];
int f[2][kMaxPowN][kMaxM];
void add(int &x, int y) {
x += y;
if (x >= kMod) x -= kMod;
}
int main() {
cin >> n >> m;
for (int i = 1; i <= m; ++i) {
cin >> u[i] >> v[i];
}
f[0][0][0] = 1;
for (int i = 1; i <= m; ++i) {
for (int j = 0; j < (1 << n); ++j) {
for (int k = 0; k <= m; ++k) {
f[i & 1][j][k] = 0;
add(f[i & 1][j][k], f[i - 1 & 1][j][k]);
if (k) add(f[i & 1][j][k], f[i - 1 & 1][j ^ (1 << u[i] - 1) ^ (1 << v[i] - 1)][k - 1]);
}
}
}
for (int i = 0; i <= m; ++i)
cout << f[m & 1][0][i] << ' ';
cout << '\n';
return 0;
}
Details
/tmp/cc2gtjOs.o: in function `main': answer.code:(.text.startup+0x9): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/cc2gtjOs.o answer.code:(.text.startup+0x3b): relocation truncated to fit: R_X86_64_PC32 against symbol `m' defined in .bss section in /tmp/cc2gtjOs.o answer.code:(.text.startup+0x4a): relocation truncated to fit: R_X86_64_PC32 against symbol `m' defined in .bss section in /tmp/cc2gtjOs.o answer.code:(.text.startup+0x65): relocation truncated to fit: R_X86_64_PC32 against symbol `v' defined in .bss section in /tmp/cc2gtjOs.o answer.code:(.text.startup+0x73): relocation truncated to fit: R_X86_64_PC32 against symbol `u' defined in .bss section in /tmp/cc2gtjOs.o answer.code:(.text.startup+0x9a): relocation truncated to fit: R_X86_64_PC32 against symbol `m' defined in .bss section in /tmp/cc2gtjOs.o answer.code:(.text.startup+0xb8): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/cc2gtjOs.o answer.code:(.text.startup+0xf8): relocation truncated to fit: R_X86_64_PC32 against symbol `u' defined in .bss section in /tmp/cc2gtjOs.o answer.code:(.text.startup+0x21a): relocation truncated to fit: R_X86_64_PC32 against symbol `m' defined in .bss section in /tmp/cc2gtjOs.o /tmp/cc2gtjOs.o: in function `_GLOBAL__sub_I_n': answer.code:(.text.startup+0x298): relocation truncated to fit: R_X86_64_PC32 against `.bss' collect2: error: ld returned 1 exit status