Skip to content

Instantly share code, notes, and snippets.

@1119-2916
Created September 26, 2017 10:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 1119-2916/84bb8a3b4afdad044fd691c709911cc5 to your computer and use it in GitHub Desktop.
Save 1119-2916/84bb8a3b4afdad044fd691c709911cc5 to your computer and use it in GitHub Desktop.
codfes2017quala-d
signed main()
{
std::ios::sync_with_stdio(false);
std::cin.tie(0);
int3(n, m, k);
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
int a = (i+j) / k % 2, b = (i-j+m) / k % 2;
if (a && b) {
cout << "R";
} else if (a) {
cout << "G";
} else if (b) {
cout << "B";
} else {
cout << "Y";
}
}
cout << endl;
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment