QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#556200 | #3961. Glitching screen | LaVuna47# | AC ✓ | 2ms | 5032kb | C++17 | 2.5kb | 2024-09-10 15:48:30 | 2024-09-10 15:48:31 |
Judging History
answer
/** gnu specific **/
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
/** contains everything I need in std **/
#include <bits/stdc++.h>
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define sz(S) ((int)S.size())
#define FOR(i, n) for(int i = 0; i < n; ++i)
#define RFOR(i, n) for(int i = n-1; i >= 0; --i)
#define output_vec(vec) { FOR(i_, sz(vec)) cout << vec[i_] << ' '; cout << '\n'; }
#define x first
#define y second
#define pb push_back
using namespace std;
typedef long long ll;
typedef vector<ll> vll;
typedef unsigned long long ull;
typedef pair<ll, ll> pll;
typedef pair<int, int> pii;
typedef pair<double, double> pdd;
typedef vector<bool> vb;
typedef short si;
typedef unsigned long long ull;
typedef long double LD;
typedef pair<ull, ull> pull;
using namespace __gnu_pbds;
typedef tree<ll, null_type, less<>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;
using namespace std;
#ifdef ONPC
mt19937 rnd(228);
#else
mt19937 rnd(chrono::high_resolution_clock::now().time_since_epoch().count());
#endif
/*
3 9 2
x.x.x.xxx
xxx.x..x.
x.x.x..x.
xx..x.xxx
x.x.x..x.
xx..x..x.
broken
....x....
.x..x....
....x....
1 4 2
x.xx
xx.x
x..x
*/
bool is_submusk(const vector<string>& func, const vector<string>& cur_sc)
{
FOR(i, sz(cur_sc))
{
FOR(j, sz(cur_sc[i]))
{
if(cur_sc[i][j] == 'x' && func[i][j] == '.')
return false;
}
}
return true;
}
int solve()
{
int n, m, k;
if(!(cin >> n >> m >> k))
return 1;
// yes <-> there exist some stop fully covered & all other are not
vector<vector<string>> sc(k, vector<string>(n));
FOR(i, k)
{
FOR(j, n)
cin >> sc[i][j];
}
vector<string> cur_sc(n);
FOR(i, n) cin >> cur_sc[i];
int sctr = 0;
FOR(i, k)
{
if(is_submusk(sc[i], cur_sc))
++sctr;
}
if(sctr == 1)
{
cout << "yes\n";
}
else
{
cout << "no\n";
}
return 0;
}
int32_t main()
{
ios::sync_with_stdio(0);
cin.tie(0);
int TET = 1e9;
//cin >> TET;
for (int i = 1; i <= TET; i++)
{
if (solve())
{
break;
}
#ifdef ONPC
cout << "__________________________" << endl;
#endif
}
#ifdef ONPC
cerr << endl << "finished in " << clock() * 1.0 / CLOCKS_PER_SEC << " sec" << endl;
#endif
}
详细
Test #1:
score: 100
Accepted
time: 0ms
memory: 3668kb
input:
3 9 2 x.x.x.xxx xxx.x..x. x.x.x..x. xx..x.xxx x.x.x..x. xx..x..x. ....x.... .x..x.... ....x....
output:
yes
result:
ok single line: 'yes'
Test #2:
score: 0
Accepted
time: 0ms
memory: 3624kb
input:
1 4 2 x.xx xx.x x..x
output:
no
result:
ok single line: 'no'
Test #3:
score: 0
Accepted
time: 0ms
memory: 3620kb
input:
3 3 1 .xx xxx x.. .x. xxx ...
output:
yes
result:
ok single line: 'yes'
Test #4:
score: 0
Accepted
time: 0ms
memory: 3620kb
input:
3 3 6 x.x xxx .xx ... .x. ... ..x ... ... ... x.. ... ... x.. ... ... ... ... x.x xxx .x.
output:
yes
result:
ok single line: 'yes'
Test #5:
score: 0
Accepted
time: 0ms
memory: 3828kb
input:
10 10 100 ..xxx.xxxx xxxxxxxx.x xxxxxxx.xx .xx.xxxxxx xxxxxxxxxx xxxx.xxxxx xx...xx.xx .x.xx.xxx. xxx.xxx.x. xxxxxxxxxx ..x....... .......... .xx....... .......... .......... .......xx. .....x..x. ...x..x.x. ....xx.... x....x.... .......x.. x......... .......... .......... .......... ..x....x.. .x.....
output:
yes
result:
ok single line: 'yes'
Test #6:
score: 0
Accepted
time: 2ms
memory: 5032kb
input:
100 100 100 xxxxxx.xxxxx.xxxx..xxx.xxxx.xx..x.xxxxxxx..xx.xxxxxxxxxxxxxxxxx..xx.x.xxxxxxxxx.xxxxxxxx.xxxxxx.xxxx xxx..x.x.xxxxxxxxxx..xxxxxxxxx..xxxxx.x.xx.x.xxxx.xxxx...x.x.xxxxxxxxxxxx.xxxxxxxxxxxxxx.xxxxx...xxx .x.xxxx.xxxxxx.xxxx.x.xxxxxxxxx.xxxxxxxxxxx.xxxxxxx.xxxx..x.x.x.xx..xxx.x.xxxxxxxxxxxx...
output:
yes
result:
ok single line: 'yes'
Test #7:
score: 0
Accepted
time: 2ms
memory: 4968kb
input:
100 100 100 xxxxxxxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxx.x.xxxxxxxxxxx.xxxxxx.xxxxxxxxxxxxx.xxxx.xxxxxxx.xxxx.xxxx.xxxx xx.xxx.xx.xxxxx...xxxxxx.xxx..xxxx.xxxxxxxxxxxxxx.xxxxxxxxxxxx..xxxxx.xxxxxx.xxx.xxxxxxxxxxxxx.xx..x .xxxxxxx..xx.xxxx.xxx.x.xxx..xxxxx.xxxx...xxx.xxx.xxxxxxxx.xx.xxxxxxxxxxxxx.x.xxx.xx.x...
output:
yes
result:
ok single line: 'yes'
Test #8:
score: 0
Accepted
time: 0ms
memory: 3608kb
input:
3 3 100 .xx x.x .xx ... ... .xx ... ... .x. ... ... ... ... x.x .xx ... ... ... ... ..x ... ... ... .xx ... ..x .x. ... ... .xx ... ... ... .xx x.x .xx ..x x.x .x. ... ... ... .x. ... ... ... ... ... ... ... ... ... ... ... ... ... .x. ... ... .x. ... ..x ... ..x x.. ... .x. ... ... ... ... ... .x. ...
output:
no
result:
ok single line: 'no'
Test #9:
score: 0
Accepted
time: 0ms
memory: 3868kb
input:
10 10 100 xxxxxxxxxx xxxxxxx.x. xxxxxxx.xx xxxxx.xxx. xxxxxxxxx. xx..xx..x. xxx.xx..xx xx.xxx.xxx xxxx.xxxxx xx..xxxxxx ..xx...... .......... ........x. .x..x...x. .x.x...... ....x...x. ..x....... .......... .......... ....x..... .......x.. .......... x..xx..... x......... ........x. .......... .......
output:
no
result:
ok single line: 'no'
Test #10:
score: 0
Accepted
time: 1ms
memory: 4500kb
input:
100 100 50 x....x.xxxxxxxx..xxxxxxx..x.xxxxxxxx..x.xxxx..xxxxxxxxx.xxxx.xxxx.xxxxxx.xxxxxxx.xxxxx.xxxxxxxx.xx.x .xxxxx.x.xxx.xxx.xxxxxxxxxxxxx.x.x.x.xxxxx.xxxxxx.xxx.xx.xxx.xx.xx.xxx.xxxx.xxxxx.xxxx.xxxx.xxxx.xxx xxxxxxx.x.xx..x.x.xx.xxx.xxxx.xx.x.xxx.xx.xxxx..xxxxxxxxx.xxx..xxx..xx.xxxxxxxxx..xxx.x...
output:
no
result:
ok single line: 'no'
Test #11:
score: 0
Accepted
time: 1ms
memory: 3744kb
input:
30 30 70 xx.xxxxxxxxxxxxx.xxx.xxxxxxx.. xx.x.xxxx..x.x.x.xxxx.xx.xxxxx xx.xx.xxxx.xxxxx...xxxxxxxx..x xx.x.x.xx...xxxxxx.x.xxxxxxxxx x.xxx.xxxxxx.xxxxxxxxxx.xxxxxx .x..xx.xxxxxxxx.xxxxx.xxxxx..x x.x..xxxxxx.xxxx..xx.xx.x..x.x xxxxxx.x.xxxxxx.xxxxxxxxxx..xx .xxxxxxxxxx..xxxxxxxxxxxxx.xxx x.xxxxxxx.xx...
output:
no
result:
ok single line: 'no'
Test #12:
score: 0
Accepted
time: 0ms
memory: 3792kb
input:
10 10 10 xxxxxxxxxx xxxxxxxxxx xxxx.xxxxx xxxxxxx.x. xxxxxxxxxx x.xxxxxx.x xxxxxxxxxx xx.xxxx.xx xxxxx.xxxx .xxxx.xxxx .x.x...... ...x.....x .......... ..x..x.... .....x.x.. .......... ....x.x... .x......x. .......... .x........ .....x.... x..xx...xx .......... .......... .x.xx.xx.. x.x.x..... ........
output:
yes
result:
ok single line: 'yes'
Test #13:
score: 0
Accepted
time: 0ms
memory: 3620kb
input:
10 10 10 .xxx..xxxx xxxxx...xx xxxxxxxxxx xxx.xxxxx. .xxxxxxxxx xxxxxxx.xx xxxxxx.xxx .xxxxxxxxx x.xxxxxxxx x..x.xxxxx ...x...... .......... .......x.. .x........ .......... ....xx.... .........x .........x x........x ......xx.. .......x.. ..x....... x.....x.x. .xx....... ....x..... ...x.....x x.......
output:
yes
result:
ok single line: 'yes'
Test #14:
score: 0
Accepted
time: 0ms
memory: 3552kb
input:
10 10 10 .xxx.x.xx. xxxxxxxxxx .xxxxxxxxx x.xx.xxxxx x.xxxxx.xx x.xxxxxxxx xxx.xxxxxx x.xxxx.xxx .xxxx.xxxx xxx.xxxxxx ...x.x.... .xx.....x. ...x....x. ...x...... x........x ...xx..x.x .......... ...x...... .......xx. x......... .......xx. .x...x.... .......... ...x.xx..x ......x... .......... ........
output:
yes
result:
ok single line: 'yes'
Test #15:
score: 0
Accepted
time: 0ms
memory: 3788kb
input:
10 10 10 xxxx.x.xxx xxxxxxxxxx xx..x.xx.x .xxx.xx.xx .x.xxxx.xx xxxxxxxxxx .xxxxxxxxx xx.xx.xx.x xxxxxxxxx. x.xxxxxxxx .......x.. .x........ .......... ......x... ....x..... .......... .......... x......... ......x... x.x.....x. ...x.....x ..xx...... .x....xx.. ......x... .x........ ..x.....x. ........
output:
yes
result:
ok single line: 'yes'
Test #16:
score: 0
Accepted
time: 0ms
memory: 3620kb
input:
10 10 10 xxxxxxxxxx xxxxxxx.x. xxxxxxx.xx xxxxx.xxx. xxxxxxxxx. xx..xx..x. xxx.xx..xx xx.xxx.xxx xxxx.xxxxx xx..xxxxxx ..xx...... .......... ........x. .x..x...x. .x.x...... ....x...x. ..x....... .......... .......... ....x..... .......x.. .......... x..xx..... x......... ........x. .......... ........
output:
yes
result:
ok single line: 'yes'
Test #17:
score: 0
Accepted
time: 0ms
memory: 3624kb
input:
10 10 10 xxx.xxxxxx xx..xxxxx. .xxxxxxxxx xxxxxxxxxx xxxxxx.xxx .xxxxx..xx xxxxxxxxxx ..xxxxxxxx xxxx..xxx. ...xxxxxxx ......x.xx x....x.... .......... .....x.... .......... .........x ......x... ........x. ........x. ...xx.x... x......... .......... ......x... ..x....... .....x.... .........x x..x....
output:
yes
result:
ok single line: 'yes'
Test #18:
score: 0
Accepted
time: 0ms
memory: 3624kb
input:
10 10 10 x....x.xxx xxxxx..xxx xxxx..x.xx xxxxxx..x. xxxx..xxxx xxxxx.xxxx .xxxx.xxxx xx.xxxxxxx .xxxxx.xxx xxxxx.xx.x .......... x..x...... x......... .......... .......... .........x .......... ....x..x.. ........x. ...x...... .......... .......... ..x....... ...x...... ........x. ..x.....xx ........
output:
no
result:
ok single line: 'no'
Test #19:
score: 0
Accepted
time: 0ms
memory: 3764kb
input:
10 10 10 xxxxxxxx.x xx..xxxxx. .xxxx.xxxx .xxxxxxxxx x.xx.xxxx. xx.x.xxxxx .xxxxxxx.x xxxxxxxxxx xxxxxx.xxx .xx.xxx.xx x...xx.... x......... ..x....... ...x....xx .......... .......... .......... .x.......x .x........ ..x....... .......x.. .x........ ....x..x.. .......x.. .......... x......... ........
output:
yes
result:
ok single line: 'yes'
Test #20:
score: 0
Accepted
time: 0ms
memory: 3836kb
input:
10 10 10 xx.xxxxxxx xxxxxx.xxx .xxxxxxx.. xx.x.xxxx. .x.x.x.xxx x.xx.xxxxx xx.xx.xxxx .xxxxx...x xxxxxxx..x xx.x.x.xx. ......x... ........x. .......... .......... .......xx. .......... .......x.x ..x....... .......... ...x...... .........x .x..x....x ...x...... .x...x..x. .x...x...x .......... .x......
output:
no
result:
ok single line: 'no'
Test #21:
score: 0
Accepted
time: 0ms
memory: 3672kb
input:
10 10 10 xxxxxx.x.. xxxxxxxxxx xxxx..x.xx xxxxxxxxx. xxxxx.xxxx xxxxxxxxxx x.xxxxxxxx xxxxxxxxxx xx..xxxxxx xxxxxxxxxx .....x.... xx........ .x....x... .......... ....x..x.. ..x....x.x .......x.x ..xx..x... .....x.... ......xxx. x.x....... xxx....x.. .x......x. ..x....... xx..x..... .x........ ........
output:
yes
result:
ok single line: 'yes'
Test #22:
score: 0
Accepted
time: 0ms
memory: 3664kb
input:
10 10 10 xx.xx.x.xx xx.xxxxxx. xx..xx.x.x .xxxx.xx.. .xx.xxx..x .x..xxxxxx xx.x.xxxxx .x.xxxxxxx xxxxx.x..x xxxxx.xx.x ........x. .......... .........x ...x...x.. .......... .......... .......... .......... x.x......x x...x..... ........xx ......xx.. .......x.. ...x...... .......... ....x...x. ........
output:
no
result:
ok single line: 'no'
Test #23:
score: 0
Accepted
time: 0ms
memory: 3672kb
input:
10 10 10 .xx.x.xxxx xxxx.xx.xx xxxxxxxxx. xxxxxx.xxx x.xxxxxxxx x.xxx.xxxx xxxxx.x.x. xxxxxxxxxx x.xxxxx.xx xx.xxxxxxx .......x.. x........x .x........ .x..xx.... ......x... .......x.x ...x...... ......x... ........x. .........x ....x..... x......... ........x. ........x. x..x..xx.x ....x..x.. ...x....
output:
yes
result:
ok single line: 'yes'
Test #24:
score: 0
Accepted
time: 0ms
memory: 3668kb
input:
10 10 10 xx.x..xxxx x.xxxxxx.. .xx.x.xxxx xxx.xxxxxx x.x.x.xx.. xxxxxx.xx. xxxx...x.x xx.xxxxxx. .x.xxxxxxx xxxxxxxx.x .......... .....x.... ......x... .......x.. ....x..... .......... .......... x.....x.x. .......... ..x..x.... .x........ ..x..x.... ......x.x. ......xx.. .......... x......... ..xx....
output:
no
result:
ok single line: 'no'
Test #25:
score: 0
Accepted
time: 0ms
memory: 3560kb
input:
10 10 10 .x.xxxxxxx xxx.xxxx.x xxxx.x.x.x xxxxxxx..x xxxxxxxx.x .xxxxxxx.x xxx..xxxxx xxxx.xxxxx xxxxxxxxxx xxxx..xxxx ...x.x.... .x........ .....x.... .......... x..x...... ......x... .......... .......... .x........ .......... .......... .......... .......... .......... x......... .......... ........
output:
yes
result:
ok single line: 'yes'
Test #26:
score: 0
Accepted
time: 0ms
memory: 3756kb
input:
10 10 10 ..xxxxxx.x xxxx..xxx. xx.xxxx.xx xxxxxxx.xx xxxxx..xxx x.xxxx.xxx xx.xxxx.xx .xxx.xx.x. xx.xxxxxx. xxx.xxx.xx ..x....... .......... .x.x....x. ......x..x .......... ..x......x .x.......x .x...x.... ........x. ......x... .......... x......... .......... ..x....... ...x...x.. ..x....... ...x....
output:
no
result:
ok single line: 'no'
Test #27:
score: 0
Accepted
time: 0ms
memory: 3536kb
input:
10 10 10 xxx..xx.xx .xx.xxx.x. .xxx..xx.. xx.xxxx.x. xx.xxx.xxx x.xx.xxx.x xxx.x.xx.x x.xxx..xxx xx.xxxxxx. .xxx.xxxxx ..x.....xx .....x.... .......... .....x.... x......... ...x...... .......x.. ..x....... xx....xxx. .......x.. .x....x... .......... ......x... .......... .......... x.....x..x ........
output:
yes
result:
ok single line: 'yes'
Test #28:
score: 0
Accepted
time: 0ms
memory: 3824kb
input:
10 10 10 .x.xxx..xx .xx.xxx.x. xxxxx.xxxx x.xxx.xxx. x.xxxx.xxx xxxxxxxxxx ..xx.x.x.. xxxx..xxx. xxx.xx.xxx xxxxxx.xxx .......... ....x..... .......... ..x.....x. x......... x...xx.... .......... x.....x... .....x.... .......... .x.x.x..xx .xx.x.x.x. x.xxx..xx. x.xx..xxx. x.xxxx.xxx xxxxxx..xx ..xx....
output:
no
result:
ok single line: 'no'
Test #29:
score: 0
Accepted
time: 0ms
memory: 3824kb
input:
10 10 10 xxxxxxxxxx xxxxxx.xxx ..xx..xxxx x.xx.xxxxx xxxxxxxxxx xxxx..x... xx.x.xxx.x xxxxxxx.xx x.xx.xxxxx x.xxxxxxxx .xx....... .....x..x. ......x.xx .......... .xxx...... x......... x..x...... .......... .......... .......... ...x...x.. ..xx...... ...x.....x .......xx. .x......x. x......... ........
output:
yes
result:
ok single line: 'yes'
Test #30:
score: 0
Accepted
time: 0ms
memory: 3796kb
input:
10 10 10 xxxxxx.xx. xx.xxxxxxx xxxxxxxxxx xxxxxxx.xx xxxx.xx.xx x.xxxxx.x. .xxxxxxxxx xxxx.xx.xx xxxxx.xx.x x..x.xx.xx .x........ .......... .......... .x........ .......... x......... ..x.....x. ...x...... x......... ...x.x.... .......... ......x... .......... ......x... .......... .......... ........
output:
yes
result:
ok single line: 'yes'
Test #31:
score: 0
Accepted
time: 0ms
memory: 3600kb
input:
10 10 10 .xxxxxxxxx xx.xxxxxxx xxxxx.xxxx xxx.xx..xx xxxxxxxxxx xxxxxxxxx. .xxxxxxxxx xxxx.xx.xx xxxx.xxxxx xxxxxxxxx. .........x .....x.... .......... ........x. .......x.. ...x...x.. ..x....x.. .....x.... .......... .......... ........x. .x......x. ....x...x. ....x..... ..x....... .......... ..x.....
output:
yes
result:
ok single line: 'yes'