QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#791278#7925. ChayasPoonYaPatCompile Error//C++14920b2024-11-28 17:49:362024-11-28 17:49:39

Judging History

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

  • [2024-11-28 17:49:39]
  • 评测
  • [2024-11-28 17:49:36]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

const ll mod= 998244353;
const int MX=(1<<24)+10;

int n,m;
ll dp[MX];
bool can[MX][25];
int val[MX][25];

int main() {
    ios_base::sync_with_stdio(0); cin.tie(0);
    cin>>n>>m;
    for (int i=0; i<m; ++i) {
        int a,b,c; cin>>a>>b>>c;
        --a; --b; --c;
        val[(1<<a)][b]|=(1<<c);
        val[(1<<c)][b]|=(1<<c);
    }

    for (int k=0; k<n; ++k) {
        can[0][k]=true;
        for (int bit=1; bit<(1<<n); ++bit) {
            int x=bit&-bit,lft=bit-x;
            if (can[lft][k] && ((val[x][k]&lft)==0)) can[bit][k]=true;
        }
    }

    dp[0]=1;
    for (int bit=1; bit<(1<<n); ++bit) {
        for (int k=0; k<n; ++k) if (bit&(1<<k)) {
            if (can[bit^(1<<k)][k] && can[bit^((1<<n)-1)][k]) dp[bit]=(dp[bit]+dp[bit^(1<<k)])%mod;
        }
    }
    cout<<dp[(1<<n)-1]<<"\n";
}

詳細信息

/tmp/ccRGscdE.o: in function `main':
answer.code:(.text.startup+0x33): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccRGscdE.o
answer.code:(.text.startup+0x4d): relocation truncated to fit: R_X86_64_PC32 against symbol `m' defined in .bss section in /tmp/ccRGscdE.o
answer.code:(.text.startup+0x5b): relocation truncated to fit: R_X86_64_PC32 against symbol `m' defined in .bss section in /tmp/ccRGscdE.o
answer.code:(.text.startup+0xfd): relocation truncated to fit: R_X86_64_PC32 against symbol `m' defined in .bss section in /tmp/ccRGscdE.o
answer.code:(.text.startup+0x105): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccRGscdE.o
collect2: error: ld returned 1 exit status