# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
369578 | penguinhacker | Crtanje (COCI20_crtanje) | C++14 | 1 ms | 364 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ar array
int n, mn = 0, mx = 0, dep[101];
string s;
vector<string> ans;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
cin >> n >> s;
ans.assign(210, string(n, '.'));
dep[0] = 105;
for (int i = 0; i < n; ++i) {
dep[i + 1] = dep[i] + (s[i] != '=' ? s[i] == '+' ? -1 : 1 : 0);
ans[max(dep[i], dep[i + 1]) - 1][i] = s[i] == '=' ? '_' : s[i] == '+' ? '/' : '\\';
}
for (string s : ans) if (count(s.begin(), s.end(), '.') < n) cout << s << "\n";
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |