Submission #374526

# Submission time Handle Problem Language Result Execution time Memory
374526 2021-03-07T10:59:19 Z Araragi Crtanje (COCI20_crtanje) C++17
0 / 50
1000 ms 101364 KB
/*
* 	author: Araragi
*/

// 3

#include <bits/stdc++.h>
using namespace std;

#define pb push_back
#define F first
#define S second
//using namespace __gnu_pbds;
//typedef tree <int, null_type, less_equal <int> , rb_tree_tag, tree_order_statistics_node_update> ordered_set;
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;

char seq[101][101];

int main()
{
	//ifstream cin("vacation.in");
	//ofstream cout("vacation.out");

	int n;
	cin >> n;

	string s;
	cin >> s;

	for (int i = 0; i <= 100; i++)
		for (int j = 0; j <= 100; j++)
			seq[i][j] = '.';

	int ed = 0, st = 1e9;
	int now = 100;
	int day = 0;

	for (char ch : s)
	{
	 	if (ch == '=')
	 	{
	 		seq[now][day] = '_';
	 		ed = max(ed, now);
	 		st = min(st, now);
	 	}
	 	else if (ch == '+')
	 	{
	 		seq[now][day] = '/';
	 		now--;
	 		ed = max(ed, now);
	 		st = min(st, now);
	 	}
	 	else if (ch == '-')
	 	{
	 		now++;
	 		seq[now][day] = '\\';
	 		ed = max(ed, now);
	 		st = min(st, now);
	 	}

	 	day++;
	}

	for (int i = st; i <= ed; i++, cout << '\n')
		for (int j = 0; j < n; j++)
			cout << seq[i][j];
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 364 KB Output isn't correct
2 Incorrect 1 ms 364 KB Output isn't correct
3 Runtime error 1 ms 492 KB Execution killed with signal 11
4 Incorrect 1 ms 364 KB Output isn't correct
5 Execution timed out 1084 ms 101364 KB Time limit exceeded