UOJ Logo

NOI.AC

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#211407#3803. 激光shiruiheng03128ms54376kbC++111.2kb2024-08-11 11:14:042024-08-11 13:04:50

answer

#include<bits/stdc++.h>
using namespace std;
using ll = long long;
//using LL = __int128
#define pi pair<ll, ll>
#define fi first
#define se second
#define N 1111111
ll n, m, k, cnt, dis[4][1111][1111];
pi v[N];
char s[1111][1111];
void debug(int u){
	for(int i = 1 ; i <= n ; i++)
		for(int j = 1 ; j <= m ; j++)
			printf("%lld%c", ((s[i][j] == '.') ? dis[u][i][j] : -1ll), " \n"[j == m]);
}
int main(){
	scanf("%lld%lld", &n, &m);
	for(int i = 1 ; i <= n ; i++){
		scanf("%s", s[i] + 1);
		for(int j = 1 ; j <= m ; j++)
			k += (s[i][j] == 'X'), cnt += ((s[i][j] != '\\') && (s[i][j] != '/') && (s[i][j] != 'X'));
	}
	if(k == 0){
		for(int i = 1 ; i <= n ; i++){
			for(int j = 1 ; j <= m ; j++)
				if(s[i][j] != '#'){
					dis[3][i][j] = dis[0][i][j - 1] + 1;
					dis[2][i][j] = dis[2][i - 1][j] + 1;
				}
			for(int j = m ; j >= 1 ; j--)
				if(s[i][j] != '#')
					dis[0][i][j] = dis[0][i][j + 1] + 1;
		}
		for(int i = n ; i >= 1 ; i--)
			for(int j = 1 ; j <= m ; j++)
				dis[1][i][j] = dis[1][i + 1][j] + 1;
		debug(2);
		debug(1);
		debug(3);
		debug(0);
		return 0;
	}
	k /= 2;
	for(int i = 1 ; i <= k ; i++){
		;
	}
	return 0;
}
/*
4 4
#..#
.#..
#..#
..#.
*/

详细

小提示:点击横条可展开更详细的信息

Test #1:

score: 0
Wrong Answer
time: 8ms
memory: 19492kb

input:

50 50
.......................#.........#................
..............................................

output:

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -1 1 1 1 1 1 1 1 1 1 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

wrong answer 2501st words differ - expected: '5', found: '50'

Test #2:

score: 0
Wrong Answer
time: 123ms
memory: 34892kb

input:

500 500
...............................................................................................

output:

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

wrong answer 250002nd words differ - expected: '141', found: '500'

Test #3:

score: 0
Wrong Answer
time: 408ms
memory: 54372kb

input:

1000 1000
#.....#..#...............#..#.##......#......#...........#....#....#.#.......#..........##...

output:

-1 1 1 1 1 1 -1 1 1 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -1 1 1 -1 1 -1 -1 1 1 1 1 1 1 -1 1 1 1 1 1 1 -1...

result:

wrong answer 1000002nd words differ - expected: '2', found: '1000'

Test #4:

score: 0
Wrong Answer
time: 310ms
memory: 54008kb

input:

990 831
...............................................................................................

output:

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

wrong answer 822691st words differ - expected: '65', found: '990'

Test #5:

score: 0
Wrong Answer
time: 372ms
memory: 54372kb

input:

1000 1000
.............................................................................................

output:

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

wrong answer 2000002nd words differ - expected: '2', found: '1'

Test #6:

score: 0
Wrong Answer
time: 3ms
memory: 18528kb

input:

3 3
/X\
X.X
.X/
1 2 2 3
2 1 3 2

output:


result:

wrong answer Unexpected EOF in the participants output

Test #7:

score: 0
Wrong Answer
time: 5ms
memory: 18532kb

input:

7 7
/X.X.X\
X\.\./X
.......
X\././X
.......
X\./.\X
\X.X.X/
1 2 7 2
1 4 7 4
1 6 7 6
2 1 2 7
4 1 4 7
...

output:


result:

wrong answer Unexpected EOF in the participants output

Test #8:

score: 0
Wrong Answer
time: 0ms
memory: 18536kb

input:

9 10
#./....\..
..../.X..#
/.X..../..
./.\./....
..X../..#.
\/.\...\..
..X...\/..
.X....X..\
....X.....

output:


result:

wrong answer Unexpected EOF in the participants output

Test #9:

score: 0
Wrong Answer
time: 4ms
memory: 18584kb

input:

50 50
.././.\.\\.\\.\/\\.//..\\..//\./////..\//..//\\...
\.....\..../\\/..\/././\.//.\\\.\\/\\\..\//...

output:


result:

wrong answer Unexpected EOF in the participants output

Test #10:

score: 0
Wrong Answer
time: 10ms
memory: 18592kb

input:

60 60
X..XXX.../...XXX././X..\..X....XX.X.X./X....XXX....\XXX.X.X.
XX..XX.//..XX\.X...X.X...X.....X....

output:


result:

wrong answer Unexpected EOF in the participants output

Test #11:

score: 0
Wrong Answer
time: 0ms
memory: 18592kb

input:

60 60
X..XXXX..X...XXX.X.XX..X..XXXXXXX.X.X.XXX.X.XXXX.X.XXXX.XXX.
XX..XX.XX..XXX.X...X.X.XXX..X..X....

output:


result:

wrong answer Unexpected EOF in the participants output

Test #12:

score: 0
Wrong Answer
time: 5ms
memory: 19692kb

input:

60 60
/..........................................................\
./..................................

output:

-1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

result:

wrong answer 61st words differ - expected: '3542', found: '2'

Test #13:

score: 0
Wrong Answer
time: 0ms
memory: 18592kb

input:

60 55
.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.
X\.........XX....X.X...XX../\../...X.....

output:


result:

wrong answer Unexpected EOF in the participants output

Test #14:

score: 0
Wrong Answer
time: 0ms
memory: 18592kb

input:

60 60
.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.
X...\\XXX//../X/////...\..\.\/X.X...

output:


result:

wrong answer Unexpected EOF in the participants output

Test #15:

score: 0
Wrong Answer
time: 0ms
memory: 18592kb

input:

60 60
.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.
X/..\\/..//.././////...\..\.\/......

output:


result:

wrong answer Unexpected EOF in the participants output

Test #16:

score: 0
Wrong Answer
time: 10ms
memory: 19612kb

input:

1000 899
........X...X..X...X.X.....X.....X...............X.XX.X.X............X..X.X.X..X..............

output:


result:

wrong answer Unexpected EOF in the participants output

Test #17:

score: 0
Wrong Answer
time: 4ms
memory: 19612kb

input:

1000 1000
X.....XXXX.X...X.........X..X.XX...X.XX......X........X..X....X....X.X.......X.......X..XX...

output:


result:

wrong answer Unexpected EOF in the participants output

Test #18:

score: 0
Wrong Answer
time: 0ms
memory: 19612kb

input:

1000 1000
XXX...XXXXXXXXXXXXXX.XXXXXXXXXXXXXXX.XXX.X.XXXXXX.XX..X.XXXXXXXXXXXXXXXXXXXXXX.XXXXX.XXXXX...

output:


result:

wrong answer Unexpected EOF in the participants output

Test #19:

score: 0
Wrong Answer
time: 12ms
memory: 19616kb

input:

1000 1000
.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...

output:


result:

wrong answer Unexpected EOF in the participants output

Test #20:

score: 0
Wrong Answer
time: 4ms
memory: 19612kb

input:

1000 1000
.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...

output:


result:

wrong answer Unexpected EOF in the participants output

Test #21:

score: 0
Wrong Answer
time: 376ms
memory: 54372kb

input:

1000 1000
...../\..../.\......//././/./\\./../..\/.......\\.\.....\\\\//.\.../.\....\...\../././../\...

output:

1 1 1 1 1 -1 -1 1 1 1 1 -1 1 -1 1 1 1 1 1 1 -1 -1 1 -1 1 -1 -1 1 -1 -1 -1 1 -1 1 1 -1 1 1 -1 -1 1 1 ...

result:

wrong answer 1006th words differ - expected: '9', found: '2'

Test #22:

score: 0
Wrong Answer
time: 375ms
memory: 54376kb

input:

1000 1000
......\...................../................................................................

output:

1 1 1 1 1 1 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

wrong answer 1007th words differ - expected: '8', found: '2'

Test #23:

score: 0
Wrong Answer
time: 367ms
memory: 54372kb

input:

1000 1000
/............................................................................................

output:

-1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

result:

wrong answer 1001st words differ - expected: '999002', found: '2'

Test #24:

score: 0
Wrong Answer
time: 266ms
memory: 43636kb

input:

700 1000
/.............................................................................................

output:

-1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

result:

wrong answer 1001st words differ - expected: '489302', found: '2'

Test #25:

score: 0
Wrong Answer
time: 392ms
memory: 54376kb

input:

1000 1000
#.....#\/................\..#\#\\/...../.....#..\........#.\..#\...\.\........\/../../...\...

output:

-1 1 1 1 1 1 -1 -1 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -1 1 1 -1 -1 -1 -1 -1 -1 1 1 1 1 1 -1 1 1 1 1 ...

result:

wrong answer 1009th words differ - expected: '25', found: '2'

Test #26:

score: 0
Wrong Answer
time: 4ms
memory: 19612kb

input:

1000 1000
.........X.\........\.......#..X............/#....\........./.............X.......X..........

output:


result:

wrong answer Unexpected EOF in the participants output

Test #27:

score: 0
Wrong Answer
time: 11ms
memory: 19612kb

input:

1000 1000
...../\\./.X.......X/..../../\.../.X..\X..........\...\..\.X/XX..../.X.....\...X...../XX.....

output:


result:

wrong answer Unexpected EOF in the participants output

Test #28:

score: 0
Wrong Answer
time: 0ms
memory: 19616kb

input:

1000 1000
.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...

output:


result:

wrong answer Unexpected EOF in the participants output

Test #29:

score: 0
Wrong Answer
time: 12ms
memory: 19616kb

input:

1000 1000
.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...

output:


result:

wrong answer Unexpected EOF in the participants output

Test #30:

score: 0
Wrong Answer
time: 11ms
memory: 19616kb

input:

1000 1000
.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...

output:


result:

wrong answer Unexpected EOF in the participants output

Test #31:

score: 0
Wrong Answer
time: 4ms
memory: 19616kb

input:

1000 1000
.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...

output:


result:

wrong answer Unexpected EOF in the participants output

Test #32:

score: 0
Wrong Answer
time: 4ms
memory: 19616kb

input:

1000 1000
.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...

output:


result:

wrong answer Unexpected EOF in the participants output

Test #33:

score: 0
Wrong Answer
time: 5ms
memory: 19616kb

input:

1000 1000
\.XXX/\X..X\XXXX.XXXXX.X.X.X/X.\XX.XX.\XXX.XXXXX\X\.XX.XX\XX/X.X.XXXXXXXXXXX.X\XXXXXXXXX/....

output:


result:

wrong answer Unexpected EOF in the participants output

Test #34:

score: 0
Wrong Answer
time: 12ms
memory: 19616kb

input:

1000 1000
X..XXXXX.XXXXXXX.XXXXX.X.X.XXXXXXX.XX.XXXX.XXX.XXXXX.X.XXXXXXX.X.XXXXXXX..XX.XXXXXXXXXXX.....

output:


result:

wrong answer Unexpected EOF in the participants output

Test #35:

score: 0
Wrong Answer
time: 11ms
memory: 19612kb

input:

1000 1000
.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...

output:


result:

wrong answer Unexpected EOF in the participants output