QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#341962 | #313. Equation Mod 2 | Kevin5307# | TL | 1300ms | 6620kb | C++20 | 668b | 2024-02-29 23:34:11 | 2024-02-29 23:34:13 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
bitset<5005> bs[5005];
int ans[5005];
int main()
{
int n,m;
cin>>n>>m;
for(int i=1;i<=m;i++)
for(int j=1;j<=n+1;j++)
{
int x;
cin>>x;
bs[i][j]=x;
}
int p=1;
for(int i=1;i<=n&&p<=m;i++)
{
if(!bs[p][i])
for(int j=p+1;j<=m;j++)
if(bs[j][i])
{
swap(bs[p],bs[j]);
break;
}
if(bs[p][i])
{
for(int j=1;j<=m;j++)
if(j!=p&&bs[j][i])
bs[j]^=bs[p];
p++;
}
}
for(int i=1;i<=m;i++)
for(int j=1;j<=n;j++)
if(bs[i][j])
{
ans[j]=bs[i][n+1];
break;
}
for(int i=1;i<=n;i++)
cout<<ans[i]<<" ";
return 0;
}
详细
Test #1:
score: 100
Accepted
time: 2ms
memory: 3584kb
input:
100 95 0 0 0 1 1 0 1 1 1 0 0 1 0 1 1 0 0 1 1 0 1 0 1 0 0 0 1 1 0 1 1 1 0 1 0 1 0 0 0 0 1 0 0 0 1 1 0 1 1 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 1 1 1 1 0 0 0 0 1 1 0 1 1 1 0 0 0 0 1 0 1 1 1 1 1 0 0 1 0 1 1 0 1 0 1 0 0 0 1 0 0 1 1 0 0 0 0 1 0 0 1 1 0 1 0 0 0 0 0 0 0 1 1 1 1 0 1 0 1 1 0 0 0 1 1 0 0 1 1 0 1...
output:
0 1 0 1 1 0 0 0 0 1 0 1 1 1 0 0 0 1 0 1 1 0 1 1 0 0 1 1 0 1 0 0 0 1 0 0 0 0 1 1 0 1 1 1 1 1 1 0 0 0 0 1 0 0 0 1 1 0 0 0 1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 1 1 0 0 0 1 0 0 0 1 0 1 1 0 0 0 1 0 1 1 1 0 0 1 1 0 0 1 1 0 1 0 1 1 0 0 1 0 0 1 1 0 0 1 1 1 0 0 0 0 0 0 1 1 1 0 0 0 0 1 0 1 0 0 1 1 1 1 0 1 0 1 1 ...
output:
1 0 1 1 0 1 1 1 1 0 1 0 0 1 1 0 0 1 1 0 0 0 0 1 1 1 1 0 0 1 0 1 1 0 0 1 1 0 1 1 0 0 1 1 1 1 1 1 1 0 1 1 0 0 1 1 1 1 0 0 0 0 0 0 0 0 1 1 0 0 0 1 1 1 1 1 1 0 0 0 1 0 0 1 0 0 0 0 0 1 1 0 1 1 0 1 0 0 1 0
result:
ok good solution
Test #10:
score: 0
Accepted
time: 2ms
memory: 3652kb
input:
100 170 1 0 1 0 0 0 0 1 1 1 0 0 0 0 0 1 1 1 0 0 0 0 1 0 0 1 0 0 0 0 1 0 0 0 1 0 0 1 0 0 0 1 0 0 1 1 0 0 1 0 1 0 0 1 0 0 1 0 1 1 1 0 0 1 1 1 1 0 0 1 0 0 0 1 1 1 0 0 1 1 1 1 0 0 1 0 1 1 0 1 1 0 1 1 0 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 0 0 0 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 0 1 0 0 1 0 0 0 1 0 0 0 1 0 0 ...
output:
1 0 1 0 0 1 1 1 1 0 1 0 0 0 1 1 0 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 0 1 1 1 1 1 1 1 1 0 0 1 1 1 0 0 1 0 1 1 0 0 1 0 0 0 1 1 1 1 0 0 1 1 1 1 1 0 1 1 0 0 1 0 1 0 1 1 1 1 0 0 1 1 0 0 1 0 0 1 1 0 0 1 0 0 1 1
result:
ok good solution
Test #11:
score: 0
Accepted
time: 137ms
memory: 6464kb
input:
1000 1407 1 0 1 1 0 0 0 1 0 0 1 0 0 0 0 0 1 0 1 1 1 1 0 1 0 1 0 0 1 1 0 0 0 1 0 0 0 0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0 1 0 0 1 ...
output:
1 1 1 0 0 1 0 1 1 0 0 0 1 0 0 1 0 0 0 0 1 1 1 1 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 1 0 0 0 1 1 1 1 0 1 0 1 0 0 1 1 0 0 0 1 0 0 1 1 1 0 1 0 1 1 0 1 1 0 0 0 1 0 1 1 1 1 0 1 0 0 0 1 1 0 1 1 0 0 0 0 1 0 1 0 0 1 0 0 1 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 1 1 0 1 0 1 0 0 1 0 0 0 1 0 1 1 0 1 0 0 0 1 1 0 ...
result:
ok good solution
Test #18:
score: 0
Accepted
time: 165ms
memory: 5960kb
input:
1000 1697 0 1 0 0 0 1 1 0 0 0 1 1 1 1 1 1 0 0 1 0 1 0 0 1 1 0 1 0 1 1 0 0 0 1 1 1 0 1 1 0 0 1 0 1 1 1 0 0 1 1 1 1 0 1 1 0 0 1 0 0 1 0 0 1 0 1 0 0 1 1 1 0 0 1 1 0 0 1 1 1 0 0 0 0 0 0 0 1 0 1 0 0 0 0 1 1 1 1 0 1 1 1 1 0 1 1 1 1 1 1 0 0 1 1 1 0 1 0 1 0 0 0 1 1 1 1 1 0 0 0 0 1 1 1 0 0 1 1 1 0 1 1 0 1 0 ...
output:
1 1 1 1 1 0 0 1 1 0 1 0 1 0 1 1 0 1 0 1 1 1 0 0 0 1 1 1 1 1 1 1 0 0 1 1 1 0 1 0 1 0 1 0 0 0 1 0 1 0 0 1 0 0 1 0 1 1 1 1 0 1 0 0 0 0 1 0 1 0 1 1 1 1 1 1 0 0 1 0 1 0 0 0 1 1 1 0 1 1 0 0 0 1 1 0 1 1 0 1 0 1 0 1 1 1 1 1 1 1 0 0 1 1 0 0 0 0 0 0 1 0 0 1 1 0 0 0 1 0 0 1 0 0 1 0 1 1 0 1 1 0 0 0 0 1 0 1 0 0 ...
result:
ok good solution
Test #19:
score: 0
Accepted
time: 33ms
memory: 3852kb
input:
1000 359 0 0 1 0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1 1 0 ...
result:
ok good solution
Test #27:
score: 0
Accepted
time: 154ms
memory: 6244kb
input:
1000 1550 1 0 1 1 1 1 0 1 1 0 1 0 1 0 0 0 0 0 1 1 0 0 0 1 1 0 0 1 0 0 1 1 0 0 1 0 1 0 1 1 0 0 0 0 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 1 0 1 0 1 0 0 1 1 0 0 0 0 1 1 1 0 1 1 1 0 0 0 1 0 1 0 0 1 1 1 1 1 1 0 1 1 0 0 1 1 1 0 1 0 0 0 1 1 0 0 1 0 0 0 0 1 0 0 0 1 0 1 1 0 0 1 1 1 0 0 0 1 0 1 1 0 1 1 0 0 1 0 0 0 0 ...
output:
0 0 1 1 1 0 1 0 0 0 0 0 1 1 0 1 0 1 1 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 1 0 0 1 1 0 0 1 0 1 1 0 1 0 0 0 0 0 1 1 1 0 1 0 1 1 1 1 1 1 0 0 1 1 1 0 1 1 0 1 0 1 0 1 1 0 0 0 0 1 0 0 1 0 0 0 1 1 0 0 0 0 1 1 0 1 0 1 0 1 1 1 1 0 1 1 0 1 1 1 0 1 0 0 1 1 1 0 0 0 0 1 0 1 1 0 1 0 0 1 0 0 0 0 0 1 0 0 1 0 1 0 0 0 0 1 ...
result:
ok good solution
Test #28:
score: 0
Accepted
time: 115ms
memory: 5968kb
input:
1000 1155 0 0 1 0 0 1 1 1 0 1 1 0 1 0 1 1 0 0 0 1 0 1 1 1 1 0 0 1 0 1 0 1 0 0 1 0 0 0 1 1 0 0 0 1 1 1 0 0 1 0 0 1 1 0 0 1 0 0 0 0 1 1 1 1 0 0 0 1 0 1 1 0 0 1 1 0 0 1 1 1 1 0 0 1 0 1 1 1 0 0 1 1 0 0 1 0 0 0 1 1 1 1 0 1 0 1 0 1 0 1 0 1 0 0 0 0 1 0 1 0 0 1 0 1 0 1 1 0 0 0 1 0 0 0 0 1 1 0 1 1 0 0 0 1 0 ...
output:
0 0 1 1 1 1 0 0 0 0 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