QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#765533 | #9246. Dominating Point | szy10010# | WA | 0ms | 6176kb | C++23 | 1.6kb | 2024-11-20 14:34:48 | 2024-11-20 14:34:48 |
Judging History
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;
bitset<N>b1(hang[i]);
int x=rand()%(n/10+1);
for(int k=1;k<=x;k++)
{
for(int j=k;j<=n;j+=x)
{
if(i==j)continue;
bitset<N>b2(lie[j]);
if((b1&b2).any());
// cout<<"1";
else if(g[i][j]=='0')
{
bl=false;
break;
}
}
if(!bl)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: 0ms
memory: 6176kb
input:
6 011010 000101 010111 100001 010100 100010
output:
1 2 3
result:
wrong answer Wrong Answer, Point not dominating.