Task: | Magija |
Sender: | henrikaalto |
Submission time: | 2019-07-25 16:21:32 +0300 |
Language: | C++ (C++17) |
Status: | READY |
Result: | 100 |
group | verdict | score |
---|---|---|
#1 | ACCEPTED | 100 |
test | verdict | time | |
---|---|---|---|
#1 | ACCEPTED | 0.01 s | details |
#2 | ACCEPTED | 0.01 s | details |
#3 | ACCEPTED | 0.01 s | details |
#4 | ACCEPTED | 0.01 s | details |
#5 | ACCEPTED | 0.01 s | details |
#6 | ACCEPTED | 0.01 s | details |
#7 | ACCEPTED | 0.01 s | details |
#8 | ACCEPTED | 0.01 s | details |
#9 | ACCEPTED | 0.01 s | details |
#10 | ACCEPTED | 0.01 s | details |
Code
#include <bits/stdc++.h> using namespace std; #define all(x) x.begin(), x.end() #define F first #define S second using pi=pair<int,int>; using ii=long long; int main() { int n, m; cin >> n >> m; vector<string>v(n); for (int i = 0; i < n; ++i) { cin >> v[i]; } vector<string>res(n*2); for (int i = 0; i < n; ++i) { res[i] = v[i]; } for (int i = 0; i < n; ++i) { res[n * 2 - i - 1] = v[i]; } for (int i = 0; i < n * 2; ++i) { string b = res[i]; reverse(all(b)); res[i] += b; } int x, y; cin >> y>> x; y--; --x; res[y][x]=res[y][x]=='#'?'.':'#'; for (int i = 0; i < n * 2; ++i) { cout << res[i] << "\n"; } }
Test details
Test 1
Verdict: ACCEPTED
input |
---|
1 1
# 2 2 |
correct output |
---|
##
#. |
user output |
---|
## #. |
Test 2
Verdict: ACCEPTED
input |
---|
5 5
..... #.##. .#.#. ..#.# ... |
correct output |
---|
..........
#.##..##.# .#.#..#.#. ..#.##.#.. #..#..#..# ... |
user output |
---|
.......... #.##..##.# .#.#..#.#. ..#.##.#.. #..#..#..# ... Truncated |
Test 3
Verdict: ACCEPTED
input |
---|
10 10
..#.###.## #.......#. ....#..### .####..#.# ... |
correct output |
---|
..#.###.####.###.#..
#.......#..#.......# ....#..######..#.... .####..#.##.#..####. .##.#.#.....##.#.##. ... |
user output |
---|
..#.###.####.###.#.. #.......#..#.......# ....#..######..#.... .####..#.##.#..####. .##.#. ... Truncated |
Test 4
Verdict: ACCEPTED
input |
---|
20 20
######..###.#..####. #..#.#.##.#.#.###.#. #..##...#..#.#.#.#.# #####..#.##.#.#..##. ... |
correct output |
---|
######..###.#..####..####..#.#... |
user output |
---|
######..###.#..####..####..#.#... Truncated |
Test 5
Verdict: ACCEPTED
input |
---|
34 33
#.##..#.####..#.#.#.#..#.#.##.... |
correct output |
---|
#.##..#.####..#.#.#.#..#.#.##.... |
user output |
---|
#.##..#.####..#.#.#.#..#.#.##.... Truncated |
Test 6
Verdict: ACCEPTED
input |
---|
41 42
#.....#.#####..###...#.##...##... |
correct output |
---|
#.....#.#####..###...#.##...##... |
user output |
---|
#.....#.#####..###...#.##...##... Truncated |
Test 7
Verdict: ACCEPTED
input |
---|
42 14
##...#.#....## #....#.#.##..# .#.#..#.###### ...#..###..##. ... |
correct output |
---|
##...#.#....####....#.#...##
#....#.#.##..##..##.#.#....# .#.#..#.############.#..#.#. ...#..###..##..##..###..#... #.####.#####....#####.####.# ... |
user output |
---|
##...#.#....####....#.#...## #....#.#.##..##..##.#.#....# .#.#..#.############.#..#.#. ... ... Truncated |
Test 8
Verdict: ACCEPTED
input |
---|
1 49
####.##.##..#####...#...#.##..... |
correct output |
---|
####.##.##..#####...#...#.##..... |
user output |
---|
####.##.##..#####...#...#.##..... Truncated |
Test 9
Verdict: ACCEPTED
input |
---|
47 2
#. .# .# .. ... |
correct output |
---|
#..#
.##. .##. .... #..# ... |
user output |
---|
#..# .##. .##. .... #..# ... Truncated |
Test 10
Verdict: ACCEPTED
input |
---|
49 49
###..#.##..#.#####.###.####.##... |
correct output |
---|
###..#.##..#.#####.###.####.##... |
user output |
---|
###..#.##..#.#####.###.####.##... Truncated |