File tree 4 files changed +90
-0
lines changed 4 files changed +90
-0
lines changed Original file line number Diff line number Diff line change
1
+ #include < bits/stdc++.h>
2
+
3
+ using namespace std ;
4
+ using ll = long long ;
5
+
6
+ int main () {
7
+ ios_base::sync_with_stdio (false );
8
+ cin.tie (0 ); cout.tie (0 );
9
+
10
+ int x;
11
+ cin >> x;
12
+ if (x < 1200 ) {
13
+ cout << " ABC" << endl;
14
+ } else {
15
+ cout << " ARC" << endl;
16
+ }
17
+
18
+ return 0 ;
19
+ }
Original file line number Diff line number Diff line change
1
+ #include < bits/stdc++.h>
2
+
3
+ using namespace std ;
4
+ using ll = long long ;
5
+
6
+ int main () {
7
+ ios_base::sync_with_stdio (false );
8
+ cin.tie (0 ); cout.tie (0 );
9
+
10
+ string s;
11
+ cin >> s;
12
+ int l = s.find_first_of (' A' );
13
+ int r = s.find_last_of (' Z' );
14
+ cout << (r - l + 1 ) << endl;
15
+
16
+ return 0 ;
17
+ }
Original file line number Diff line number Diff line change
1
+ #include < bits/stdc++.h>
2
+
3
+ using namespace std ;
4
+ using ll = long long ;
5
+
6
+ int main () {
7
+ ios_base::sync_with_stdio (false );
8
+ cin.tie (0 ); cout.tie (0 );
9
+
10
+ ll x;
11
+ cin >> x;
12
+ ll p = x / 11 ;
13
+ ll q = x % 11 ;
14
+ if (q == 0 ) {
15
+ cout << 2 * p << endl;
16
+ } else if (q <= 6 ) {
17
+ cout << 2 * p + 1 << endl;
18
+ } else {
19
+ cout << 2 * p + 2 << endl;
20
+ }
21
+
22
+ return 0 ;
23
+ }
Original file line number Diff line number Diff line change
1
+ #include < bits/stdc++.h>
2
+
3
+ using namespace std ;
4
+ using ll = long long ;
5
+
6
+ int N;
7
+ vector<int > A;
8
+
9
+ int solve () {
10
+ unordered_set<int > s;
11
+ for (auto a : A) {
12
+ s.insert (a);
13
+ }
14
+ int K = s.size ();
15
+ if (K % 2 == 0 ) return K - 1 ;
16
+ else return K;
17
+ }
18
+
19
+ int main () {
20
+ ios_base::sync_with_stdio (false );
21
+ cin.tie (0 ); cout.tie (0 );
22
+
23
+ cin >> N;
24
+ A.assign (N, 0 );
25
+ for (int i = 0 ; i < N; ++i) {
26
+ cin >> A[i];
27
+ }
28
+ cout << solve () << endl;
29
+
30
+ return 0 ;
31
+ }
You can’t perform that action at this time.
0 commit comments