| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1252765 | aren_dance | Nowruz (IOI17_nowruz) | Text | 0 ms | 0 KiB |
#include <iostream>
#include <fstream>
#include <vector>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<string> input(n);
for (int i = 0; i < n; ++i) {
cin >> input[i];
}
ofstream fout("output.txt");
for (int i = 0; i < n; ++i) {
string row = "";
for (int j = 0; j < m; ++j) {
if (input[i][j] == '#') {
row += '#';
} else {
if (i == n - 1) {
row += '.';
}
else if (i % 3 == 2) {
row += '.';
}
else if (i % 3 == 0) {
if (j == 0)
row += '.';
else
row += 'X';
}
else { // i % 3 == 1
if (j % 2 == 0)
row += '.';
else
row += 'X';
}
}
}
fout << row << '\n';
}
fout.close();
return 0;
}
//#include <iostream>
#include <fstream>
#include <vector>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<string> input(n);
for (int i = 0; i < n; ++i) {
cin >> input[i];
}
ofstream fout("output.txt");
for (int i = 0; i < n; ++i) {
string row = "";
for (int j = 0; j < m; ++j) {
if (input[i][j] == '#') {
row += '#';
} else {
if (i == n - 1) {
row += '.';
}
else if (i % 3 == 2) {
row += '.';
}
else if (i % 3 == 0) {
if (j == 0)
row += '.';
else
row += 'X';
}
else { // i % 3 == 1
if (j % 2 == 0)
row += '.';
else
row += 'X';
}
}
}
fout << row << '\n';
}
fout.close();
return 0;
}
#include <iostream>
#include <fstream>
#include <vector>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<string> input(n);
for (int i = 0; i < n; ++i) {
cin >> input[i];
}
ofstream fout("output.txt");
for (int i = 0; i < n; ++i) {
string row = "";
for (int j = 0; j < m; ++j) {
if (input[i][j] == '#') {
row += '#';
} else {
if (i == n - 1) {
row += '.';
}
else if (i % 3 == 2) {
row += '.';
}
else if (i % 3 == 0) {
if (j == 0)
row += '.';
else
row += 'X';
}
else { // i % 3 == 1
if (j % 2 == 0)
row += '.';
else
row += 'X';
}
}
}
fout << row << '\n';
}
fout.close();
return 0;
}
#include <iostream>
#include <fstream>
#include <vector>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<string> input(n);
for (int i = 0; i < n; ++i) {
cin >> input[i];
}
ofstream fout("output.txt");
for (int i = 0; i < n; ++i) {
string row = "";
for (int j = 0; j < m; ++j) {
if (input[i][j] == '#') {
row += '#';
} else {
if (i == n - 1) {
row += '.';
}
else if (i % 3 == 2) {
row += '.';
}
else if (i % 3 == 0) {
if (j == 0)
row += '.';
else
row += 'X';
}
else { // i % 3 == 1
if (j % 2 == 0)
row += '.';
else
row += 'X';
}
}
}
fout << row << '\n';
}
fout.close();
return 0;
}
#include <iostream>
#include <fstream>
#include <vector>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<string> input(n);
for (int i = 0; i < n; ++i) {
cin >> input[i];
}
ofstream fout("output.txt");
for (int i = 0; i < n; ++i) {
string row = "";
for (int j = 0; j < m; ++j) {
if (input[i][j] == '#') {
row += '#';
} else {
if (i == n - 1) {
row += '.';
}
else if (i % 3 == 2) {
row += '.';
}
else if (i % 3 == 0) {
if (j == 0)
row += '.';
else
row += 'X';
}
else { // i % 3 == 1
if (j % 2 == 0)
row += '.';
else
row += 'X';
}
}
}
fout << row << '\n';
}
fout.close();
return 0;
}
#include <iostream>
#include <fstream>
#include <vector>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<string> input(n);
for (int i = 0; i < n; ++i) {
cin >> input[i];
}
ofstream fout("output.txt");
for (int i = 0; i < n; ++i) {
string row = "";
for (int j = 0; j < m; ++j) {
if (input[i][j] == '#') {
row += '#';
} else {
if (i == n - 1) {
row += '.';
}
else if (i % 3 == 2) {
row += '.';
}
else if (i % 3 == 0) {
if (j == 0)
row += '.';
else
row += 'X';
}
else { // i % 3 == 1
if (j % 2 == 0)
row += '.';
else
row += 'X';
}
}
}
fout << row << '\n';
}
fout.close();
return 0;
}
#include <iostream>
#include <fstream>
#include <vector>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<string> input(n);
for (int i = 0; i < n; ++i) {
cin >> input[i];
}
ofstream fout("output.txt");
for (int i = 0; i < n; ++i) {
string row = "";
for (int j = 0; j < m; ++j) {
if (input[i][j] == '#') {
row += '#';
} else {
if (i == n - 1) {
row += '.';
}
else if (i % 3 == 2) {
row += '.';
}
else if (i % 3 == 0) {
if (j == 0)
row += '.';
else
row += 'X';
}
else { // i % 3 == 1
if (j % 2 == 0)
row += '.';
else
row += 'X';
}
}
}
fout << row << '\n';
}
fout.close();
return 0;
}
#include <iostream>
#include <fstream>
#include <vector>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<string> input(n);
for (int i = 0; i < n; ++i) {
cin >> input[i];
}
ofstream fout("output.txt");
for (int i = 0; i < n; ++i) {
string row = "";
for (int j = 0; j < m; ++j) {
if (input[i][j] == '#') {
row += '#';
} else {
if (i == n - 1) {
row += '.';
}
else if (i % 3 == 2) {
row += '.';
}
else if (i % 3 == 0) {
if (j == 0)
row += '.';
else
row += 'X';
}
else { // i % 3 == 1
if (j % 2 == 0)
row += '.';
else
row += 'X';
}
}
}
fout << row << '\n';
}
fout.close();
return 0;
}
#include <iostream>
#include <fstream>
#include <vector>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<string> input(n);
for (int i = 0; i < n; ++i) {
cin >> input[i];
}
ofstream fout("output.txt");
for (int i = 0; i < n; ++i) {
string row = "";
for (int j = 0; j < m; ++j) {
if (input[i][j] == '#') {
row += '#';
} else {
if (i == n - 1) {
row += '.';
}
else if (i % 3 == 2) {
row += '.';
}
else if (i % 3 == 0) {
if (j == 0)
row += '.';
else
row += 'X';
}
else { // i % 3 == 1
if (j % 2 == 0)
row += '.';
else
row += 'X';
}
}
}
fout << row << '\n';
}
fout.close();
return 0;
}
#include <iostream>
#include <fstream>
#include <vector>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<string> input(n);
for (int i = 0; i < n; ++i) {
cin >> input[i];
}
ofstream fout("output.txt");
for (int i = 0; i < n; ++i) {
string row = "";
for (int j = 0; j < m; ++j) {
if (input[i][j] == '#') {
row += '#';
} else {
if (i == n - 1) {
row += '.';
}
else if (i % 3 == 2) {
row += '.';
}
else if (i % 3 == 0) {
if (j == 0)
row += '.';
else
row += 'X';
}
else { // i % 3 == 1
if (j % 2 == 0)
row += '.';
else
row += 'X';
}
}
}
fout << row << '\n';
}
fout.close();
return 0;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
