QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#479845 | #313. Equation Mod 2 | NOI_AK_ME# | AC ✓ | 1748ms | 7096kb | C++17 | 1.0kb | 2024-07-15 21:10:55 | 2024-07-15 21:10:55 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
const int N = 5505;
int n, m, b[N], c[N];
bitset<N> a[N];
void gauss() {
int t = 1;
for (int i = 1; i <= n && t <= m; ++i) {
if (!a[t][i]) {
for (int j = t + 1; j <= m; ++j) {
if (a[j][i]) {
swap(a[j], a[t]);
break;
}
}
}
if (!a[t][i]) continue;
for (int j = 1; j <= m; ++j) {
if (j != t) {
if (a[j][i] == 1) {
a[j] ^= a[t];
}
assert(a[j][i] == 0);
}
}
c[i] = t;
++t;
}
memset(b, 0, sizeof b);
for (int i = 1; i <= n; ++i) {
if (c[i] != 0) {
int j = c[i];
for (int k = 1; k <= m; ++k)
if (k != j) {
assert(a[k][i] == 0);
}
b[i] = (a[j][n + 1] == 1);
}
}
}
int main() {
std::ios::sync_with_stdio(false);
std::cin >> n >> m;
for (int i = 1; i <= m; ++i) {
for (int j = 1; j <= n + 1; ++j) {
int x;
std::cin >> x;
a[i][j] = x;
}
}
gauss();
for (int i = 1; i <= n; ++i) {
cout << b[i] << " \n"[i == n];
}
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 3680kb
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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output:
1 1 0 0 0 1 0 0 1 1 1 1 0 1 1 1 0 1 1 1 1 0 1 0 1 0 0 0 0 0 0 1 1 0 0 0 0 0 0 1 0 0 0 1 0 0 1 0 1 0 0 1 1 1 0 1 1 1 0 0 0 1 0 0 1 0 0 0 1 1 0 0 1 0 1 0 1 1 0 1 0 0 0 1 1 0 1 1 1 1 1 0 0 0 1 0 0 0 1 0 0 0 0 0 0 1 0 1 1 0 0 0 0 1 0 1 1 0 1 1 0 0 0 0 1 1 0 1 0 1 1 0 0 1 1 1 1 0 0 1 0 1 1 1 0 0 0 0 1 0 ...
result:
ok good solution
Test #13:
score: 0
Accepted
time: 105ms
memory: 4720kb
input:
1000 1613 1 1 1 0 1 0 1 0 0 1 0 1 0 0 1 0 0 0 1 0 1 1 1 1 1 0 1 1 0 0 1 0 1 0 1 0 1 1 0 0 1 1 0 1 1 0 0 0 0 1 1 1 1 1 0 1 0 1 0 0 0 1 1 0 1 1 0 1 0 0 0 1 1 1 1 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 1 1 1 1 0 0 1 0 0 1 1 1 0 1 0 0 1 0 0 1 1 0 0 1 0 1 1 1 1 0 1 0 1 0 1 0 1 1 1 0 1 1 0 1 0 0 0 0 1 1 0 1 0 1 1 ...
output:
0 0 0 1 1 0 0 0 1 1 1 0 0 0 0 1 0 0 0 0 1 0 1 0 0 1 0 0 1 1 1 1 1 0 0 0 0 0 0 1 0 0 0 1 1 1 0 0 0 1 1 1 1 0 1 1 0 0 0 1 0 0 0 1 1 0 0 0 1 0 0 1 1 0 1 1 0 1 1 0 0 0 0 1 0 0 1 1 0 0 1 1 1 1 1 1 0 1 1 1 0 0 1 0 0 1 1 1 0 0 0 1 0 1 0 0 0 1 0 0 1 0 1 1 0 1 0 1 0 1 1 0 0 1 1 1 0 0 0 1 1 1 0 1 0 0 0 1 1 1 ...
result:
ok good solution
Test #14:
score: 0
Accepted
time: 119ms
memory: 4904kb
input:
1000 1814 0 1 0 0 1 0 0 0 1 0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...
output:
1 1 0 0 0 0 1 0 0 0 0 1 0 1 1 1 1 0 1 0 0 1 1 1 0 0 0 1 0 1 0 1 1 0 0 1 0 0 1 0 1 1 0 1 1 0 0 1 1 1 1 0 0 0 0 1 1 0 0 1 1 1 1 1 0 0 1 1 0 1 0 0 0 1 0 1 1 1 0 0 1 1 1 0 1 1 0 1 0 1 0 0 1 0 0 0 0 0 1 1 1 1 1 0 0 0 1 0 0 1 0 1 0 1 0 0 0 1 1 0 0 0 1 0 1 0 0 1 1 1 0 1 1 1 1 1 1 0 1 0 1 1 0 1 0 1 0 0 0 1 ...
result:
ok good solution
Test #43:
score: 0
Accepted
time: 834ms
memory: 6316kb
input:
3000 3956 1 0 1 1 1 1 0 1 0 1 0 0 0 1 0 0 1 0 0 0 0 1 1 1 1 1 0 1 1 0 1 0 0 1 1 1 1 1 1 1 0 1 0 0 1 1 0 0 1 1 1 0 0 0 1 1 0 1 0 0 1 1 0 0 0 1 1 0 0 0 1 0 0 1 1 0 0 1 1 0 0 0 1 0 1 0 1 1 0 0 1 1 0 1 0 0 0 0 0 1 1 0 1 0 1 1 0 1 0 0 0 1 0 0 1 0 0 0 0 0 0 1 0 1 1 0 1 1 0 1 1 1 0 0 1 1 0 0 1 0 0 0 1 0 0 ...
output:
0 0 1 0 0 0 1 1 0 0 0 1 0 0 0 0 0 1 1 1 0 0 0 1 1 0 0 1 1 1 0 1 1 1 1 1 0 1 0 1 0 0 0 1 0 0 1 0 0 0 0 1 0 0 0 0 1 1 0 1 1 1 1 1 0 1 0 1 1 1 0 0 0 1 0 0 0 0 1 1 0 0 0 0 0 1 0 1 1 1 1 0 0 0 1 0 0 0 1 0 0 1 0 0 0 0 1 0 0 0 1 1 0 1 0 1 1 1 1 0 1 1 0 1 0 0 1 1 1 0 1 1 1 0 0 0 1 0 1 0 1 1 0 1 1 0 1 0 1 0 ...
result:
ok good solution
Test #44:
score: 0
Accepted
time: 519ms
memory: 5428kb
input:
3000 2645 1 0 0 0 1 0 0 1 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