小问题
  • 板块学术版
  • 楼主Karamata
  • 当前回复14
  • 已保存回复14
  • 发布时间2020/5/12 08:58
  • 上次更新2023/11/7 02:37:36
查看原帖
小问题
272000
Karamata楼主2020/5/12 08:58

想了想还是转学术版吧(

从输出所省略的额外重寻址溢出

请问这是啥意思

代码:

#include<bits/stdc++.h>
using namespace std;
bool qwq[100001][100001];
int n,m,a,b;
char c;
bool t[100001];
int main()
{
	memset(qwq,true,sizeof(qwq));
	cin>>n>>m;
	while(m--)
	{
		cin>>c>>a>>b;
		if(c=='D')
			qwq[a][b]=qwq[b][a]=0,t[a]=t[b]=1;
		if(c=='A')
		{
			if(t[a]==0 || t[b]==0)
				printf("not sure\n");
			else
			{
				if(qwq[a][b])
					printf("same\n");
				else
					printf("different\n");
			}
		}
	}
	return 0;
}
2020/5/12 08:58
加载中...