# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
857271 | SalihSahin | Crtanje (COCI20_crtanje) | C++14 | 1 ms | 348 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
#define int long long
using namespace std;
const int mod = 998244353;
int32_t main(){
cin.tie(0);
ios_base::sync_with_stdio(false);
int n;
cin>>n;
string s;
cin>>s;
vector<vector<char> > a(205, vector<char>(n, '.'));
int y = 102;
int mxf = 102, mnf = 102;
for(int i = 0; i < n; i++){
if(s[i] == '+'){
a[y][i] = '/';
y--;
mnf = min(mnf, y);
}
else if(s[i] == '-'){
y++;
a[y][i] = 92;
mxf = max(mxf, y);
}
else{
a[y][i] = '_';
}
}
for(int i = mnf; i <= mxf; i++){
for(int j = 0; j < n; j++){
//cout<<" gh "<<endl;
cout<<a[i][j];
}
cout<<endl;
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |