0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-12-24 18:31:59 +00:00

P4327 [COCI2006-2007#1] Okviri

R39854645
This commit is contained in:
Baoshuo Ren 2020-10-15 19:31:46 +08:00 committed by Baoshuo Ren
parent 15308f9454
commit 22662275f5
Signed by: baoshuo
GPG Key ID: 70F90A673FB1AB68
3 changed files with 42 additions and 0 deletions

36
problem/P4327/P4327.cpp Normal file
View File

@ -0,0 +1,36 @@
#include <bits/stdc++.h>
using namespace std;
int main() {
string ans[5] = {".", ".", "#", ".", "."};
string s;
cin >> s;
for (int i = 0; i < s.size(); i++) {
if ((i + 1) % 3 == 0) {
ans[0] += ".*..";
ans[1] += "*.*.";
ans[2] += (string) "." + s[i] + ".*";
ans[3] += "*.*.";
ans[4] += ".*..";
}
else {
ans[0] += ".#..";
ans[1] += "#.#.";
if ((i + 1) % 3 == 2 && i + 1 != s.size()) {
ans[2] += (string) "." + s[i] + ".*";
}
else {
ans[2] += (string) "." + s[i] + ".#";
}
ans[3] += "#.#.";
ans[4] += ".#..";
}
}
cout << ans[0] << endl
<< ans[1] << endl
<< ans[2] << endl
<< ans[3] << endl
<< ans[4] << endl;
return 0;
}

BIN
problem/P4327/data/P4327_2.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
problem/P4327/data/P4327_2.out (Stored with Git LFS) Normal file

Binary file not shown.