Submission #1252697

#TimeUsernameProblemLanguageResultExecution timeMemory
1252697aren_danceNowruz (IOI17_nowruz)Text
0 / 100
0 ms0 KiB
#include <bits/stdc++.h> 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 { if (j % 2 == 0) row += '.'; else row += 'X'; } } } fout << row << "\n"; } fout.close(); return 0; }
#include <bits/stdc++.h> 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 { if (j % 2 == 0) row += '.'; else row += 'X'; } } } fout << row << "\n"; } fout.close(); return 0; }
#include <bits/stdc++.h> 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 { if (j % 2 == 0) row += '.'; else row += 'X'; } } } fout << row << "\n"; } fout.close(); return 0; }
#include <bits/stdc++.h> 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 { if (j % 2 == 0) row += '.'; else row += 'X'; } } } fout << row << "\n"; } fout.close(); return 0; }
#include <bits/stdc++.h> 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 { if (j % 2 == 0) row += '.'; else row += 'X'; } } } fout << row << "\n"; } fout.close(); return 0; }
#include <bits/stdc++.h> 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 { if (j % 2 == 0) row += '.'; else row += 'X'; } } } fout << row << "\n"; } fout.close(); return 0; }
#include <bits/stdc++.h> 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 { if (j % 2 == 0) row += '.'; else row += 'X'; } } } fout << row << "\n"; } fout.close(); return 0; }
#include <bits/stdc++.h> 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 { if (j % 2 == 0) row += '.'; else row += 'X'; } } } fout << row << "\n"; } fout.close(); return 0; }
#include <bits/stdc++.h> 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 { if (j % 2 == 0) row += '.'; else row += 'X'; } } } fout << row << "\n"; } fout.close(); return 0; }
#include <bits/stdc++.h> 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 { if (j % 2 == 0) row += '.'; else row += 'X'; } } } fout << row << "\n"; } fout.close(); return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...