QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#142279#7. 主旋律NOI_AK_MECompile Error//C++981.3kb2023-08-18 21:27:512023-08-18 21:27:53

Judging History

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

  • [2023-08-18 21:27:53]
  • 评测
  • [2023-08-18 21:27:51]
  • 提交

answer

#include<bits/stdc++.h>
#define rep(a,b,c) for(register int a=(b);a<=(c);++a)
#define dow(a,b,c) for(register int a=(b);a>=(c);--a)
using namespace std;
constexpr int MaxN=15+5,MaxFull=((1<<15)|5),Mod=1000000007;
constexpr unsigned long long Limit=(1uLL<<63);
inline void SimpleMod(int &wei)
	{(wei>=Mod)&&(wei-=Mod);}
int Bitset[MaxN],Pow[MaxN*MaxN],C[MaxFull],F[MaxFull],G[MaxFull];
inline int lowbit(const int x)
	{return (x&(-x));}
int main()
{
	ios::sync_with_stdio(false),cin.tie(nullptr);
	int n,m;
	cin>>n>>m,Pow[0]=1;
	const int Full=((1<<n)-1);
	rep(i,1,m)
		SimpleMod(Pow[i]=(Pow[i-1]<<1));
	int u,v;
	while(m--)
		cin>>u>>v,Bitset[v-1]|=(1<<(u-1));
	rep(x,0,Full)
	{
		rep(i,1,n)
			C[1<<(i-1)]=__builtin_popcount(Bitset[i-1]&x);
		for(int y=x;y;y=(y-1)&x)
			C[x^y]=(C[lowbit(x^y)]+C[(x^y)^lowbit(x^y)]);
		C[x]=(C[lowbit(x)]+C[x^lowbit(x)]);
		unsigned long long Sum=((unsigned long long)F[lowbit(x)]*G[x^lowbit(x)])%Mod;
		for(int y=(x^lowbit(x));y;y=(y-1)&(x^lowbit(x)))
			if((Sum+=((unsigned long long)F[y|lowbit(x)]*G[x^(y|lowbit(x))]))&Limit)
				Sum%=Mod;
		SimpleMod(G[x]=(Mod-(Sum%Mod))),Sum=Pow[C[x]];
		for(int y=x;y;y=(y-1)&x)
			if((Sum+=((unsigned long long)G[y]*Pow[C[x^y]]))&Limit)
				Sum%=Mod;
		SimpleMod(G[x]+=(Mod-(F[x]=(Sum%Mod))));
	}
	cout<<F[Full]<<'\n';
	return 0;
}

Details

answer.code:5:1: error: ‘constexpr’ does not name a type
    5 | constexpr int MaxN=15+5,MaxFull=((1<<15)|5),Mod=1000000007;
      | ^~~~~~~~~
answer.code:5:1: note: C++11 ‘constexpr’ only available with ‘-std=c++11’ or ‘-std=gnu++11’
answer.code:6:1: error: ‘constexpr’ does not name a type
    6 | constexpr unsigned long long Limit=(1uLL<<63);
      | ^~~~~~~~~
answer.code:6:1: note: C++11 ‘constexpr’ only available with ‘-std=c++11’ or ‘-std=gnu++11’
answer.code: In function ‘void SimpleMod(int&)’:
answer.code:8:16: error: ‘Mod’ was not declared in this scope
    8 |         {(wei>=Mod)&&(wei-=Mod);}
      |                ^~~
answer.code: At global scope:
answer.code:9:12: error: ‘MaxN’ was not declared in this scope
    9 | int Bitset[MaxN],Pow[MaxN*MaxN],C[MaxFull],F[MaxFull],G[MaxFull];
      |            ^~~~
answer.code:9:22: error: ‘MaxN’ was not declared in this scope
    9 | int Bitset[MaxN],Pow[MaxN*MaxN],C[MaxFull],F[MaxFull],G[MaxFull];
      |                      ^~~~
answer.code:9:27: error: ‘MaxN’ was not declared in this scope
    9 | int Bitset[MaxN],Pow[MaxN*MaxN],C[MaxFull],F[MaxFull],G[MaxFull];
      |                           ^~~~
answer.code:9:35: error: ‘MaxFull’ was not declared in this scope
    9 | int Bitset[MaxN],Pow[MaxN*MaxN],C[MaxFull],F[MaxFull],G[MaxFull];
      |                                   ^~~~~~~
answer.code:9:46: error: ‘MaxFull’ was not declared in this scope
    9 | int Bitset[MaxN],Pow[MaxN*MaxN],C[MaxFull],F[MaxFull],G[MaxFull];
      |                                              ^~~~~~~
answer.code:9:57: error: ‘MaxFull’ was not declared in this scope
    9 | int Bitset[MaxN],Pow[MaxN*MaxN],C[MaxFull],F[MaxFull],G[MaxFull];
      |                                                         ^~~~~~~
answer.code: In function ‘int main()’:
answer.code:14:45: error: ‘nullptr’ was not declared in this scope
   14 |         ios::sync_with_stdio(false),cin.tie(nullptr);
      |                                             ^~~~~~~
answer.code:16:19: error: ‘Pow’ was not declared in this scope; did you mean ‘pow’?
   16 |         cin>>n>>m,Pow[0]=1;
      |                   ^~~
      |                   pow
answer.code:22:27: error: ‘Bitset’ was not declared in this scope; did you mean ‘sigset’?
   22 |                 cin>>u>>v,Bitset[v-1]|=(1<<(u-1));
      |                           ^~~~~~
      |                           sigset
answer.code:26:25: error: ‘C’ was not declared in this scope
   26 |                         C[1<<(i-1)]=__builtin_popcount(Bitset[i-1]&x);
      |                         ^
answer.code:26:56: error: ‘Bitset’ was not declared in this scope; did you mean ‘sigset’?
   26 |                         C[1<<(i-1)]=__builtin_popcount(Bitset[i-1]&x);
      |                                                        ^~~~~~
      |                                                        sigset
answer.code:28:25: error: ‘C’ was not declared in this scope
   28 |                         C[x^y]=(C[lowbit(x^y)]+C[(x^y)^lowbit(x^y)]);
      |                         ^
answer.code:29:17: error: ‘C’ was not declared in this scope
   29 |                 C[x]=(C[lowbit(x)]+C[x^lowbit(x)]);
      |                 ^
answer.code:30:61: error: ‘F’ was not declared in this scope
   30 |                 unsigned long long Sum=((unsigned long long)F[lowbit(x)]*G[x^lowbit(x)])%Mod;
      |                                                             ^
answer.code:30:74: error: ‘G’ was not declared in this scope
   30 |                 unsigned long long Sum=((unsigned long long)F[lowbit(x)]*G[x^lowbit(x)])%Mod;
      |                                                                          ^
answer.code:30:90: error: ‘Mod’ was not declared in this scope
   30 |                 unsigned long long Sum=((unsigned long long)F[lowbit(x)]*G[x^lowbit(x)])%Mod;
      |                                                                                          ^~~
answer.code:32:91: error: ‘Limit’ was not declared in this scope
   32 |                         if((Sum+=((unsigned long long)F[y|lowbit(x)]*G[x^(y|lowbit(x))]))&Limit)
      |                                                                                           ^~~~~
answer.code:36:74: error: ‘Limit’ was not declared in this scope
   36 |                         if((Sum+=((unsigned long long)G[y]*Pow[C[x^y]]))&Limit)
      |                                                                          ^~~~~
answer.code:40:15: error: ‘F’ was not declared in this scope
   40 |         cout<<F[Full]<<'\n';
      |               ^