Submission
Status:
[PPPPPPPPP]
Score: 100
User: Dormon
Problemset: ภูเขา
Language: cpp
Time: 0.002 second
Submitted On: 2024-12-03 10:34:46
#include <iostream>
#include <cstring>
#include <vector>
#include <algorithm>
#include <functional>
#include <queue>
#include <numeric>
#define debug(...) Debug(#__VA_ARGS__, __VA_ARGS__)
using namespace std;
const bool TEST_CASE = 0;
template<typename T>
typename std::enable_if<std::is_integral<T>::value>::type
Debug(const char* name, T value) {
std::cout << name << " : " << value << '\n';
}
template<typename T, typename... Args>
typename std::enable_if<std::is_integral<T>::value>::type
Debug(const char* names, T value, Args... args) {
const char* comma = strchr(names, ',');
std::cout.write(names, comma - names) << " : " << value << " | ";
Debug(comma + 1, args...);
}
void solve(){
int n;
cin >> n;
vector<int> v(n);
for (auto &e:v)
cin >> e;
vector<int> h;
for (auto e:v){
for (int i = 1;i <= e;i++)
h.push_back(i);
for (int i = e;i >= 1;i--)
h.push_back(i);
}
for (int i = *max_element(v.begin(), v.end());i >= 1;i--){
bool ch = 1;
for (auto e:h){
if (e == i)
cout << "/\\"[ch ^= 1];
else
cout << '.';
}
cout << '\n';
}
}
int main()
{
ios_base::sync_with_stdio(0); cin.tie(0);
int q = 1;
if (TEST_CASE) cin >> q;
while (q--){
solve();
}
}