Submission #64031528
Source Code Expand
#include <bits/stdc++.h>
using namespace std;
#define hehe(...) DEBUG(#__VA_ARGS__, __VA_ARGS__)
#define fi first
#define se second
#define endl '\n'
typedef unsigned long long ull;
typedef long double ld;
typedef long long ll;
//---------------------------------
template<typename T1, typename T2>
ostream& operator<<(ostream &os, const pair<T1, T2> &p) { return os << "(" << p.first << ", " << p.second << ")"; }
template<typename T1, typename T2 = decay<decltype(*begin(declval<T1>()))>, typename enable_if<!is_same<T1, string>::value>::type* = nullptr>
ostream& operator<<(ostream &os, const T1 &c) {
os << "[";
for (auto it = c.begin(); it != c.end(); ++it) {
if (it != c.begin()) os << ", ";
os << *it;
}
return os << "]";
}
template<typename T>
ostream& operator<<(ostream &os, const vector<vector<T>> &vv) {
os << "\n";
for (const auto& row : vv) {
os << " [";
for (auto it = row.begin(); it != row.end(); ++it) {
if (it != row.begin()) os << ", ";
os << *it;
}
os << "]\n";
}
return os << ' ';
}
template<typename T>
void DEBUG(const string& s, const T& x) { cout << "\033[1;35m" << s << "\033[0;32m ⇒ \033[33m" << x << "\033[0m\n"; }
template<typename T, typename... Args>
void DEBUG(const string& s, const T& x, const Args&... args) {
size_t commaPosition = s.find(',');
string name = s.substr(0, commaPosition);
cout << "\033[1;35m" << name << "\033[0;32m ⇒ \033[33m" << x << "\033[29m ‖ \033[0m";
DEBUG(s.substr(commaPosition + 2), args...);
}
//---------------------------------
const ll INF = 1e9;
const int MOD = 1e9 + 7;
const int MAXN = 1e6 + 9;
ll N, M, K, Q, X, Y, Z;
string S;
void solve() {
cin >> N;
string ans = "";
if (N & 1) {
N--;
for (int i = 0; i < N / 2; i++) {
ans += '-';
}
ans += '=';
for (int i = 0; i < N / 2; i++) {
ans += '-';
}
} else {
N -= 2;
for (int i = 0; i < N / 2; i++) {
ans += '-';
}
ans += "==";
for (int i = 0; i < N / 2; i++) {
ans += '-';
}
}
cout << ans << endl;
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int T = 1;
/*cin >> T;*/
while (T--) {
solve();
}
return 0;
}
//-----------
//-------------------
//-----------------------------
Submission Info
| Submission Time |
|
| Task |
A - Doors in the Center |
| User |
lunr1x |
| Language |
C++ 17 (gcc 12.2) |
| Score |
100 |
| Code Size |
2427 Byte |
| Status |
AC |
| Exec Time |
1 ms |
| Memory |
3532 KiB |
Judge Result
| Set Name |
Sample |
All |
| Score / Max Score |
0 / 0 |
100 / 100 |
| Status |
|
|
| Set Name |
Test Cases |
| Sample |
sample_01.txt, sample_02.txt |
| All |
random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, sample_01.txt, sample_02.txt |
| Case Name |
Status |
Exec Time |
Memory |
| random_03.txt |
AC |
1 ms |
3416 KiB |
| random_04.txt |
AC |
1 ms |
3480 KiB |
| random_05.txt |
AC |
1 ms |
3384 KiB |
| random_06.txt |
AC |
1 ms |
3516 KiB |
| random_07.txt |
AC |
1 ms |
3436 KiB |
| random_08.txt |
AC |
1 ms |
3328 KiB |
| random_09.txt |
AC |
1 ms |
3324 KiB |
| random_10.txt |
AC |
1 ms |
3480 KiB |
| sample_01.txt |
AC |
1 ms |
3532 KiB |
| sample_02.txt |
AC |
1 ms |
3468 KiB |