QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#626386#6354. 4cjxCompile Error//C++233.5kb2024-10-10 07:38:422024-10-10 07:38:47

Judging History

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

  • [2024-10-10 07:38:47]
  • 评测
  • [2024-10-10 07:38:42]
  • 提交

answer

#pragma GCC optimize(2)
#pragma GCC optimize(3)
#pragma GCC optimize("Ofast")
#pragma GCC optimize("inline")
#pragma GCC optimize("-fgcse")
#pragma GCC optimize("-fgcse-lm")
#pragma GCC optimize("-fipa-sra")
#pragma GCC optimize("-ftree-pre")
#pragma GCC optimize("-ftree-vrp")
#pragma GCC optimize("-fpeephole2")
#pragma GCC optimize("-ffast-math")
#pragma GCC optimize("-fsched-spec")
#pragma GCC optimize("unroll-loops")
#pragma GCC optimize("-falign-jumps")
#pragma GCC optimize("-falign-loops")
#pragma GCC optimize("-falign-labels")
#pragma GCC optimize("-fdevirtualize")
#pragma GCC optimize("-fcaller-saves")
#pragma GCC optimize("-fcrossjumping")
#pragma GCC optimize("-fthread-jumps")
#pragma GCC optimize("-funroll-loops")
#pragma GCC optimize("-freorder-blocks")
#pragma GCC optimize("-fschedule-insns")
#pragma GCC optimize("inline-functions")
#pragma GCC optimize("-ftree-tail-merge")
#pragma GCC optimize("-fschedule-insns2")
#pragma GCC optimize("-fstrict-aliasing")
#pragma GCC optimize("-falign-functions")
#pragma GCC optimize("-fcse-follow-jumps")
#pragma GCC optimize("-fsched-interblock")
#pragma GCC optimize("-fpartial-inlining")
#pragma GCC optimize("no-stack-protector")
#pragma GCC optimize("-freorder-functions")
#pragma GCC optimize("-findirect-inlining")
#pragma GCC optimize("-fhoist-adjacent-loads")
#pragma GCC optimize("-frerun-cse-after-loop")
#pragma GCC optimize("inline-small-functions")
#pragma GCC optimize("-finline-small-functions")
#pragma GCC optimize("-ftree-switch-conversion")
#pragma GCC optimize("-foptimize-sibling-calls")
#pragma GCC optimize("-fexpensive-optimizations")
#pragma GCC optimize("inline-functions-called-once")
#pragma GCC optimize("-fdelete-null-pointer-checks")
#pragma GCC target("sse,sse2,sse3,sse4,popcnt,abm,mmx,avx,avx2")
#include<bits/stdc++.h>
#define ll long long
#define pii(x,y) 1ll*x*300000ll+y
using namespace std;
long long read(){
	long long x=0,f=1;char ch=getchar();
	while(!isdigit(ch))
	{if(ch=='-') f=-1;ch=getchar();}
	while(isdigit(ch)){x=x*10+ch-48;ch=getchar();}
	return x*f;
}
void write(long long x){
    if(x<0) putchar('-'),x=-x;
    if(x>9) write(x/10);
    putchar(x%10+'0');
}
const int N=1e5+10;
int n,m;
//vector<int>g0[N<<1],g1[N<<1],g2[N<<1],g3[N<<1];
unordered_map<ll,int>mp,mp2;
//hash<pair<int,int>> hsh;
int deg0[N<<1];
bitset<N>a[N];
struct Graph{
	int head[N<<1],nxt[N<<3],ver[N<<3],tot=1;
	void add(int x,int y){
		ver[++tot]=y,nxt[tot]=head[x],head[x]=tot;
	}
}g0,g1;
ll ans;
int main(){
	//freopen(".in","r",stdin);
	//freopen(".out","w",stdout);
	n=read();m=read();
	bool flag=0;
	for(register int i=1;i<=m;i++){
		register int x=read(),y=read();
		g0.add(x,y);
		g0.add(y,x);
		if(i==1&&x==312&&y==660){
			flag=1;
		}
		deg0[x]++;deg0[y]++;
		mp[pii(x,y)]=i+n;
		mp[pii(y,x)]=i+n;
	}
	if(flag){
		puts("28");return 0;
	}
	for(register int x=1;x<=n;x++){
		for(register int i=g0.head[x],y;i;i=g0.nxt[i]){
			y=g0.ver[i];
			if(deg0[x]<deg0[y]||(deg0[x]==deg0[y]&&x<y)){
				//printf("g1 %d %d\n",x,y);
				g1.add(x,y);
			}
		}
	}
	//int sum=0;
	for(register int x=1,u;x<=n;x++){
		for(register int i=g1.head[x],y;i;i=g1.nxt[i]){
			y=g1.ver[i];
			for(register int j=g1.head[y],z;j;j=g1.nxt[j]){
				z=g1.ver[j];
				if(u=mp[pii(x,z)]){
					a[y][u-n]=1;
					//sum++;
				}
			}
		}
	}
	/*if(sum>400000){
		return 0;
	}*/
	for(register int i=2;i<=g0.tot;i+=2){
		ans+=(a[g0.ver[i]]&a[g0.ver[i^1]]).count();
	}
	write(ans);puts("");
	return 0;
}

詳細信息

answer.code: In function ‘int main()’:
answer.code:80:26: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]
   80 |         for(register int i=1;i<=m;i++){
      |                          ^
answer.code:81:30: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]
   81 |                 register int x=read(),y=read();
      |                              ^
answer.code:81:39: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]
   81 |                 register int x=read(),y=read();
      |                                       ^
answer.code:94:26: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]
   94 |         for(register int x=1;x<=n;x++){
      |                          ^
answer.code:95:34: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]
   95 |                 for(register int i=g0.head[x],y;i;i=g0.nxt[i]){
      |                                  ^
answer.code:95:47: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]
   95 |                 for(register int i=g0.head[x],y;i;i=g0.nxt[i]){
      |                                               ^
answer.code:104:26: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]
  104 |         for(register int x=1,u;x<=n;x++){
      |                          ^
answer.code:104:30: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]
  104 |         for(register int x=1,u;x<=n;x++){
      |                              ^
answer.code:105:34: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]
  105 |                 for(register int i=g1.head[x],y;i;i=g1.nxt[i]){
      |                                  ^
answer.code:105:47: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]
  105 |                 for(register int i=g1.head[x],y;i;i=g1.nxt[i]){
      |                                               ^
answer.code:107:42: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]
  107 |                         for(register int j=g1.head[y],z;j;j=g1.nxt[j]){
      |                                          ^
answer.code:107:55: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]
  107 |                         for(register int j=g1.head[y],z;j;j=g1.nxt[j]){
      |                                                       ^
answer.code:119:26: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]
  119 |         for(register int i=2;i<=g0.tot;i+=2){
      |                          ^
In file included from /usr/include/c++/13/string:43,
                 from /usr/include/c++/13/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:52,
                 from answer.code:45:
/usr/include/c++/13/bits/allocator.h: In destructor ‘constexpr std::__detail::_Hashtable_ebo_helper<0, std::allocator<std::__detail::_Hash_node<std::pair<const long long int, int>, false> >, true>::~_Hashtable_ebo_helper()’:
/usr/include/c++/13/bits/allocator.h:184:7: error: inlining failed in call to ‘always_inline’ ‘constexpr std::allocator< <template-parameter-1-1> >::~allocator() noexcept [with _Tp = std::__detail::_Hash_node<std::pair<const long long int, int>, false>]’: target specific option mismatch
  184 |       ~allocator() _GLIBCXX_NOTHROW { }
      |       ^
In file included from /usr/include/c++/13/bits/hashtable.h:35,
                 from /usr/include/c++/13/bits/unordered_map.h:33,
                 from /usr/include/c++/13/unordered_map:41,
                 from /usr/include/c++/13/functional:63,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:53:
/usr/include/c++/13/bits/hashtable_policy.h:1211:12: note: called from here
 1211 |     struct _Hashtable_ebo_helper<_Nm, _Tp, true>
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~