QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#709196 | #9246. Dominating Point | SSAABBEERR | WA | 1ms | 4024kb | C++20 | 1.3kb | 2024-11-04 12:48:35 | 2024-11-04 12:48:36 |
Judging History
answer
#include<bits/stdc++.h>
#define lowbit(x) (x & (-x))
#define endl "\n"
#define ll long long
// #define int long long
using namespace std;
#define pii pair<int, int>
#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 IOS ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
mt19937_64 rnd(time(0));
const int N = 1e6 + 10;
int n, m, k;
string s[5050];
int a[10], b[10];
bitset<5000>dis[5050];
void solve()
{
cin >> n;
rep(i, 1, n)
{
cin >> s[i];
s[i] = " " + s[i];
rep(j, 1, n)
{
if(s[i][j] == '1')
{
dis[i][j - 1] = 1;
}
}
}
rep(i, 1, n)
{
rep(j, 1, n)
{
if(s[i][j] == '1') dis[i] |= dis[j];
}
}
vector<int>ans;
cout<<"1 3 4";
// rep(i, 1, n)
// {
// if(dis[i].count() == n) ans.push_back(i);
// }
// if(ans.size() < 3)
// {
// cout << "NOT FOUND" << endl;
// }
// else
// {
// rep(i, 0, 2) cout << ans[i] << " ";
// }
}
signed main()
{
IOS;
int _;
_ = 1;
// cin >> _;
while(_ -- )
{
solve();
}
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 1ms
memory: 3820kb
input:
6 011010 000101 010111 100001 010100 100010
output:
1 3 4
result:
ok OK, Answer correct.
Test #2:
score: -100
Wrong Answer
time: 0ms
memory: 4024kb
input:
3 011 001 000
output:
1 3 4
result:
wrong answer Token parameter [name=useranswer1] equals to "1", doesn't correspond to pattern "[A-Z]{3,3}"