Submission #341982

#TimeUsernameProblemLanguageResultExecution timeMemory
341982cheissmartCostinland (info1cup19_costinland)C++14
0 / 100
1 ms204 KiB
#include <bits/stdc++.h> #define IO_OP std::ios::sync_with_stdio(0); std::cin.tie(0); #define F first #define S second #define V vector #define PB push_back #define MP make_pair #define EB emplace_back #define ALL(v) (v).begin(), (v).end() #define debug(x) cerr << "Line(" << __LINE__ << ") -> " << #x << " is " << x << endl using namespace std; typedef long long ll; typedef pair<int, int> pi; typedef V<int> vi; const int INF = 1e9 + 7; signed main() { IO_OP; ll k; cin >> k; if(k <= 19) { k -= 2; string a[5] = { "Xrrrd", "dXXXd", "dXX.d", "dX..d", "rrrr." }; if(k < 16) { array<pair<pi, char>, 4> b = { MP(MP(3, 0), 'r'), // 1 MP(MP(0, 3), 'X'), // 2 MP(MP(0, 2), 'X'), // 4 MP(MP(0, 1), 'X') // 8 }; for(int i = 0; i < 4; i++) { if(k >> i & 1) { a[b[i].F.F][b[i].F.S] = b[i].S; } } } cout << 5 << ' ' << 5 << '\n'; for(int i = 0; i < 5; i++) { for(int j = 0; j < 5; j++) cout << a[i][j]; cout <<'\n'; } } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...