# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
473760 | MamdouhN | Crtanje (COCI20_crtanje) | C++17 | 1 ms | 332 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define endl "\n"
char ar[300][300];
main()
{
for(int i=0;i<300;i++)for(int j=0;j<300;j++)ar[i][j]='.';
int n;
string s;
cin>>n>>s;
int i = 101 , j=0,mx=0,mn=1e9;
for(int o=0;o<n;o++)
{
char c;
if(s[o]=='+')c='/';
if(s[o]=='-')c='\\';
if(s[o]=='=')c='_';
ar[i][j]=c;
mx=max(mx,i);
mn=min(mn,i);
if(o==n-1)continue;
j++;
if(s[o]=='+'&&s[o+1]!=' -')i--;
if(s[o]=='-'&&s[o+1]=='-')i++;
}
for(int i = mn;i<=mx;i++)
{
for(int j=0;j<n;j++)cout<<ar[i][j];
cout<<endl;
}
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |