QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#765412#9246. Dominating Pointszy10010#WA 1ms5932kbC++231.5kb2024-11-20 14:13:592024-11-20 14:14:00

Judging History

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

  • [2024-11-22 18:38:25]
  • hack成功,自动添加数据
  • (/hack/1238)
  • [2024-11-20 14:14:00]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:5932kb
  • [2024-11-20 14:13:59]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
#define fi first
#define se second
#define u1 (u<<1)
#define u2 (u<<1|1)
#define pb push_back
#define pp pop_back()
#define int long long
#define laile cout<<"laile"<<endl
#define lowbit(x) ((x)&(-x))
#define double long double
#define sf(x) scanf("%lld",&x)
#define sff(x,y) scanf("%lld %lld",&x,&y)
#define sd(x) scanf("%Lf",&x)
#define sdd(x,y) scanf("%Lf %Lf",&x,&y)
#define _for(i,n) for(int i=0;i<(n);++i)
#define _rep(i,a,b) for(int i=(a);i<=(b);++i)
#define _pre(i,a,b) for(int i=(a);i>=(b);--i)
#define all(x) (x).begin(), (x).end()
#define IOS ios::sync_with_stdio(false);cin.tie(0);cout.tie(0)
typedef unsigned long long ULL;
typedef pair<int,int>PII;
const int N=5050,INF=4e18;
int n,m;
char g[N][N];
char g2[N][N];
string hang[N],lie[N];
void solve()
{
	cin>>n;
	m=n;
	_rep(i,1,n)
	{
		string now="";
		_rep(j,1,m)
			cin>>g[i][j],now.pb(g[i][j]);
		hang[i]=now;
	}
	_rep(j,1,m)
	{
		string now="";
		_rep(i,1,n)
			now.pb(g[i][j]);
		lie[j]=now;
	}
	vector<int>res;
	_rep(i,1,n)
	{
		bool bl=true;
		_rep(j,1,m)
		{
			bitset<N>b1(hang[i]);
			bitset<N>b2(lie[j]);
			if(!(b1&b2).any())
			{
				if(g[i][j]=='0')
				{
					bl=false;
					break;
				}
			}
		}
		if(bl)res.pb(i);
		if(res.size()>=3)break;
	}
	if(res.size()<3)cout<<"NOT FOUND\n";
	else 
		cout<<res[0]<<" "<<res[1]<<" "<<res[2]<<'\n';
	return ;
}
signed main()
{
	IOS;
	int T=1;
//	cin>>T;
	while(T--)
		solve();
	return 0;
}

详细

Test #1:

score: 0
Wrong Answer
time: 1ms
memory: 5932kb

input:

6
011010
000101
010111
100001
010100
100010

output:

NOT FOUND

result:

wrong output format Expected integer, but "NOT" found