QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#533807#3961. Glitching screenYarema#AC ✓4ms4940kbC++20891b2024-08-26 14:54:362024-08-26 14:54:36

Judging History

你现在查看的是最新测评结果

  • [2024-08-26 14:54:36]
  • 评测
  • 测评结果:AC
  • 用时:4ms
  • 内存:4940kb
  • [2024-08-26 14:54:36]
  • 提交

answer

#include <bits/stdc++.h>

using namespace std;

#define FOR(i, a, b) for(int i = (a); i < (b); i++)
#define RFOR(i, a, b) for(int i = (a) - 1; i >= (b); i--)
#define SZ(a) int(a.size())
#define ALL(a) a.begin(), a.end()
#define PB push_back
#define MP make_pair
#define F first
#define S second

typedef long long LL;
typedef vector<int> VI;
typedef pair<int, int> PII;
typedef double db;

int main()
{
	ios::sync_with_stdio(0);
	cin.tie(0);
	
	int h, w, n;
	cin >> h >> w >> n;
	vector<string> s(h * n);
	FOR (i, 0, h * n)
		cin >> s[i];
	vector<string> f(h);
	FOR (i, 0, h)
		cin >> f[i];
	int cnt = 0;
	FOR (i, 0, n)
	{
		bool ok = true;
		FOR (j, 0, h)
		{
			FOR (k, 0, w)
			{
				if (s[i * h + j][k] == '.' && f[j][k] == 'x')
					ok = false;
			}
		}
		if (ok)
			cnt++;
	}
	cout << (cnt == 1 ? "yes" : "no") << '\n';
	
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3592kb

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: 3588kb

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: 3588kb

input:

3 3 1
.xx
xxx
x..
.x.
xxx
...

output:

yes

result:

ok single line: 'yes'

Test #4:

score: 0
Accepted
time: 0ms
memory: 3824kb

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: 3572kb

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: 0ms
memory: 4940kb

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: 4ms
memory: 4724kb

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: 3592kb

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: 3628kb

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: 2ms
memory: 4180kb

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: 0ms
memory: 3676kb

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: 3596kb

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: 3820kb

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: 3540kb

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: 3752kb

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: 3616kb

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: 3784kb

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: 3600kb

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: 3588kb

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: 3756kb

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: 3488kb

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: 3600kb

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: 3588kb

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: 3580kb

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: 3600kb

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: 3548kb

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: 3784kb

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: 3616kb

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: 3620kb

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: 3748kb

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: 3752kb

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'