Skip to content

Commit 67e2b89

Browse files
authored
Add files via upload
1 parent 81615db commit 67e2b89

File tree

2 files changed

+180
-0
lines changed

2 files changed

+180
-0
lines changed

cf/cf_round_487/2A.cpp

+97
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
#include <bits/stdc++.h>
2+
using namespace std;
3+
4+
#ifdef Wavator
5+
6+
#define Debug(...) fprintf(stderr, __VA_ARGS__);
7+
8+
#define De(x) cerr << #x << '=' << x << endl;
9+
10+
#else
11+
12+
#define cerr if (false) cout
13+
14+
#define Debug(...) 98;
15+
16+
#define De(x) 99;
17+
18+
#endif
19+
20+
#define REP(i, a, b) for (int i = (a); i < (b); ++i)
21+
22+
#define PB push_back
23+
24+
#define MP make_pair
25+
26+
#define complete_unique(x) x.resize(unique(x.begin(), x.end()) - x.begin())
27+
28+
#define PER(i, a, b) for (int i = (b) - 1; i >= (a); --i)
29+
30+
#define ALL(x) x.begin(), x.end()
31+
32+
#define RALL(x) x.rbegin(), x.rend()
33+
34+
typedef long long LL;
35+
typedef double db;
36+
typedef vector<int> vi;
37+
typedef vector<LL> vl;
38+
typedef vector<db> vd;
39+
typedef pair<int, int> pii;
40+
typedef pair<LL, LL> pll;
41+
typedef pair<db, db> pdd;
42+
43+
template <typename T>
44+
inline void cma(T &a, const T & b) {
45+
a = max(a, b);
46+
}
47+
48+
template <typename T>
49+
inline void cmi(T &a, const T & b) {
50+
a = min(a, b);
51+
}
52+
53+
template <typename T>
54+
ostream & operator << (ostream &os, const vector<T> &v) {
55+
for (auto & x: v)
56+
os << x << ' ';
57+
return os;
58+
}
59+
60+
template <typename A, typename B>
61+
ostream & operator << (ostream &os, const pair<A, B> &in) {
62+
os << in.first << ' ' << in.second;
63+
return os;
64+
}
65+
66+
int main() {
67+
#ifdef Wavator
68+
freopen("test.in", "r", stdin);
69+
#endif
70+
map<string, bool> mp;
71+
mp.insert(MP("red", 1));
72+
mp.insert(MP("purple", 1));
73+
mp.insert(MP("yellow", 1));
74+
mp.insert(MP("orange", 1));
75+
mp.insert(MP("blue", 1));
76+
mp.insert(MP("green", 1));
77+
map<string, string> s;
78+
s["purple"] = "Power";
79+
s["green"] = "Time";
80+
s["blue"] = "Space";
81+
s["orange"] = "Soul";
82+
s["red"] = "Reality";
83+
s["yellow"] = "Mind";
84+
int n;
85+
cin >> n;
86+
int ans = 6 - n;
87+
for (; n--; ) {
88+
string in;
89+
cin >> in;
90+
mp[in] = 0;
91+
}
92+
cout << ans << endl;
93+
for (auto&x: mp)
94+
if (x.second)
95+
cout << s[x.first] << endl;
96+
return 0;
97+
}

cf/cf_round_487/2B.cpp

+83
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
#include <bits/stdc++.h>
2+
using namespace std;
3+
4+
#ifdef Wavator
5+
6+
#define Debug(...) fprintf(stderr, __VA_ARGS__);
7+
8+
#define De(x) cerr << #x << '=' << x << endl;
9+
10+
#else
11+
12+
#define cerr if (false) cout
13+
14+
#define Debug(...) 98;
15+
16+
#define De(x) 99;
17+
18+
#endif
19+
20+
#define REP(i, a, b) for (int i = (a); i < (b); ++i)
21+
22+
#define PB push_back
23+
24+
#define MP make_pair
25+
26+
#define complete_unique(x) x.resize(unique(x.begin(), x.end()) - x.begin())
27+
28+
#define PER(i, a, b) for (int i = (b) - 1; i >= (a); --i)
29+
30+
#define ALL(x) x.begin(), x.end()
31+
32+
#define RALL(x) x.rbegin(), x.rend()
33+
34+
typedef long long LL;
35+
typedef double db;
36+
typedef vector<int> vi;
37+
typedef vector<LL> vl;
38+
typedef vector<db> vd;
39+
typedef pair<int, int> pii;
40+
typedef pair<LL, LL> pll;
41+
typedef pair<db, db> pdd;
42+
43+
template <typename T>
44+
inline void cma(T &a, const T & b) {
45+
a = max(a, b);
46+
}
47+
48+
template <typename T>
49+
inline void cmi(T &a, const T & b) {
50+
a = min(a, b);
51+
}
52+
53+
template <typename T>
54+
ostream & operator << (ostream &os, const vector<T> &v) {
55+
for (auto & x: v)
56+
os << x << ' ';
57+
return os;
58+
}
59+
60+
template <typename A, typename B>
61+
ostream & operator << (ostream &os, const pair<A, B> &in) {
62+
os << in.first << ' ' << in.second;
63+
return os;
64+
}
65+
66+
int main() {
67+
#ifdef Wavator
68+
freopen("test.in", "r", stdin);
69+
#endif
70+
LL x, y;
71+
cin >> x >> y;
72+
if (x == y) {
73+
cout<<'=';
74+
return 0;
75+
}
76+
if (x * log(y) > y * log(x))
77+
cout << '<';
78+
else if (x * log(y) < y * log(x))
79+
cout << '>';
80+
else
81+
cout << '=';
82+
return 0;
83+
}

0 commit comments

Comments
 (0)