diff options
43 files changed, 761 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e935fd3 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +binaries diff --git a/08-03-2022(Div.3)/.cph/.A_Deletions_of_Two_Adjacent_Letters.cpp_691f772586c92182cd3ca9396098375f.prob b/08-03-2022(Div.3)/.cph/.A_Deletions_of_Two_Adjacent_Letters.cpp_691f772586c92182cd3ca9396098375f.prob new file mode 100644 index 0000000..52ce51e --- /dev/null +++ b/08-03-2022(Div.3)/.cph/.A_Deletions_of_Two_Adjacent_Letters.cpp_691f772586c92182cd3ca9396098375f.prob @@ -0,0 +1 @@ +{"name":"A. Deletions of Two Adjacent Letters","group":"Codeforces - Codeforces Round #776 (Div. 3)","url":"https://codeforces.com/contest/1650/problem/0","interactive":false,"memoryLimit":256,"timeLimit":2000,"tests":[{"id":1646751197936,"input":"5\nabcde\nc\nabcde\nb\nx\ny\naaaaaaaaaaaaaaa\na\ncontest\nt","output":"YES\nNO\nNO\nYES\nYES"},{"id":1646853307171,"input":"1\nqjjyzcsjy\ns","output":""}],"testType":"single","input":{"type":"stdin"},"output":{"type":"stdout"},"languages":{"java":{"mainClass":"Main","taskClass":"ADeletionsOfTwoAdjacentLetters"}},"batch":{"id":"b130b25d-3d3d-4fce-9d67-8671131df21f","size":1},"srcPath":"/home/peng/test/Problem_Solving/08-03-2022(Div.3)/A_Deletions_of_Two_Adjacent_Letters.cpp"}
\ No newline at end of file diff --git a/08-03-2022(Div.3)/.cph/.B_DIV_MOD.cpp_276b8c89d227db4a79dee1685b9c289c.prob b/08-03-2022(Div.3)/.cph/.B_DIV_MOD.cpp_276b8c89d227db4a79dee1685b9c289c.prob new file mode 100644 index 0000000..7eca9cb --- /dev/null +++ b/08-03-2022(Div.3)/.cph/.B_DIV_MOD.cpp_276b8c89d227db4a79dee1685b9c289c.prob @@ -0,0 +1 @@ +{"name":"B. DIV + MOD","group":"Codeforces - Codeforces Round #776 (Div. 3)","url":"https://codeforces.com/contest/1650/problem/B","interactive":false,"memoryLimit":256,"timeLimit":2000,"tests":[{"id":1646752657834,"input":"5\n1 4 3\n5 8 4\n6 10 6\n1 1000000000 1000000000\n10 12 8","output":"2\n4\n5\n999999999\n5"},{"id":1646833131418,"input":"1\n1 100 1","output":"100"}],"testType":"single","input":{"type":"stdin"},"output":{"type":"stdout"},"languages":{"java":{"mainClass":"Main","taskClass":"BDIVMOD"}},"batch":{"id":"18dc3187-28ba-42e4-adb6-b241bf475a66","size":1},"srcPath":"/home/peng/test/Problem_Solving/08-03-2022(Div.3)/B_DIV_MOD.cpp"}
\ No newline at end of file diff --git a/08-03-2022(Div.3)/A b/08-03-2022(Div.3)/A Binary files differnew file mode 100755 index 0000000..a2ce84f --- /dev/null +++ b/08-03-2022(Div.3)/A diff --git a/08-03-2022(Div.3)/A.cpp b/08-03-2022(Div.3)/A.cpp new file mode 100644 index 0000000..741b57a --- /dev/null +++ b/08-03-2022(Div.3)/A.cpp @@ -0,0 +1,25 @@ +#include<bits/stdc++.h> + +using namespace std; + +int main(){ + int tt; + cin >> tt; + while(tt--){ + string word; + char ch; + cin >> word; + cin >> ch; + int len = word.length(); + if(word[len/2 + 1] == ch){ + cout << word[len/2 + 1] << endl; + cout << ch << endl; + cout << "YES" << "\n"; + } + else{ + cout << "NO" << "\n"; + } + } + + return 0; +}
\ No newline at end of file diff --git a/08-03-2022(Div.3)/A_Deletions_of_Two_Adjacent_Letters b/08-03-2022(Div.3)/A_Deletions_of_Two_Adjacent_Letters Binary files differnew file mode 100755 index 0000000..c79eb1d --- /dev/null +++ b/08-03-2022(Div.3)/A_Deletions_of_Two_Adjacent_Letters diff --git a/08-03-2022(Div.3)/A_Deletions_of_Two_Adjacent_Letters.cpp b/08-03-2022(Div.3)/A_Deletions_of_Two_Adjacent_Letters.cpp new file mode 100644 index 0000000..3f7daa2 --- /dev/null +++ b/08-03-2022(Div.3)/A_Deletions_of_Two_Adjacent_Letters.cpp @@ -0,0 +1,37 @@ +#include<bits/stdc++.h> + +using namespace std; + +void findMultOcc(vector<int> &indices, string str, char ch){ + for(int i = 0; i < str.length();i++){ + if(str[i] == ch){ + indices.push_back(i); + } + } +} + +string solve(vector<int> indices){ + for(int i = 0; i < indices.size(); i++) + { + if(indices[i] >= 0 && indices[i] % 2 == 0){ + return "YES"; + } + } + return "NO"; +} + +int main(){ + int tt; + cin >> tt; + while(tt--){ + vector<int> indices; + string word; + char ch; + cin >> word; + cin >> ch; + findMultOcc(indices, word, ch); + cout << solve(indices) << '\n'; + } + + return 0; +} diff --git a/08-03-2022(Div.3)/B b/08-03-2022(Div.3)/B Binary files differnew file mode 100755 index 0000000..b11c838 --- /dev/null +++ b/08-03-2022(Div.3)/B diff --git a/08-03-2022(Div.3)/B.cpp b/08-03-2022(Div.3)/B.cpp new file mode 100644 index 0000000..dd8bb54 --- /dev/null +++ b/08-03-2022(Div.3)/B.cpp @@ -0,0 +1,23 @@ +#include<bits/stdc++.h> + +using namespace std; + +int modDiv(int r, int a){ + // law r % a == 0, return r-1 % a + r-1 /a, else return r % a + r /a; + if(r % a == 0){ + return (r-1) % a + (r-1)/a; + } + return r % a + r / a; +} + +int main(){ + int tt; + while(tt--){ + cout << "tt: " << tt; + int l, r, a; + cin >> l >> r >> a; + cout << modDiv(r, a); + } + + return 0; +}
\ No newline at end of file diff --git a/08-03-2022(Div.3)/B_DIV_MOD.cpp b/08-03-2022(Div.3)/B_DIV_MOD.cpp new file mode 100644 index 0000000..f861b3b --- /dev/null +++ b/08-03-2022(Div.3)/B_DIV_MOD.cpp @@ -0,0 +1,23 @@ +#include<bits/stdc++.h> + +using namespace std; + +int modDiv(int r, int a){ + // law r % a == 0, return r-1 % a + r-1 /a, else return r % a + r /a; + if(r % a == 0){ + return (r-1) % a + (r-1)/a; + } + return r % a + r / a; +} + +int main(){ + int tt; + cin >> tt; + while(tt--){ + int l, r, a; + cin >> l >> r >> a; + cout << modDiv(r, a) << endl; + } + + return 0; +} diff --git a/08-03-2022(Div.3)/C.cpp b/08-03-2022(Div.3)/C.cpp new file mode 100644 index 0000000..f63ebcd --- /dev/null +++ b/08-03-2022(Div.3)/C.cpp @@ -0,0 +1,22 @@ +#include<bits/stdc++.h> + +using namespace std; + +int main(){ + int tt; + cin >> tt; + while(tt--){ + list<int> ls; + int len; + int x; + cin >> len; + for(int i = 0; i < len; i++){ + cin >> x; + ls.push_back(x); + } + + + } + + return 0; +}
\ No newline at end of file diff --git a/08-03-2022(Div.3)/D.cpp b/08-03-2022(Div.3)/D.cpp new file mode 100644 index 0000000..0572f03 --- /dev/null +++ b/08-03-2022(Div.3)/D.cpp @@ -0,0 +1,20 @@ +#include<bits/stdc++.h> + +using namespace std; + +int solve() +{ + +} + +int main(){ + int tt; + cin >> tt; + while(tt--){ + + + } + + + return 0; +} diff --git a/08-03-2022(Div.3)/E.cpp b/08-03-2022(Div.3)/E.cpp new file mode 100644 index 0000000..2601cd5 --- /dev/null +++ b/08-03-2022(Div.3)/E.cpp @@ -0,0 +1,9 @@ +#include<bits/stdc++.h> + +using namespace std; + +int main(){ + int tt; + + return 0; +}
\ No newline at end of file diff --git a/08-03-2022(Div.3)/tempCodeRunnerFile b/08-03-2022(Div.3)/tempCodeRunnerFile Binary files differnew file mode 100755 index 0000000..9154686 --- /dev/null +++ b/08-03-2022(Div.3)/tempCodeRunnerFile diff --git a/21-04-2022(Div.4)/A b/21-04-2022(Div.4)/A Binary files differnew file mode 100755 index 0000000..58be759 --- /dev/null +++ b/21-04-2022(Div.4)/A diff --git a/21-04-2022(Div.4)/A.cpp b/21-04-2022(Div.4)/A.cpp new file mode 100644 index 0000000..35c326e --- /dev/null +++ b/21-04-2022(Div.4)/A.cpp @@ -0,0 +1,23 @@ +#include<bits/stdc++.h> + +using namespace std; + +int main(){ + int tt, x; + cin >> tt; + while(tt--){ + cin >> x; + if(x >= 1900){ + cout << "Division 1" << '\n'; + } + else if(x >= 1600 && x <= 1899){ + cout << "Division 2" << '\n'; + } + else if(x >= 1400 && x <= 1599){ + cout << "Division 3" << '\n'; + } + else{ + cout << "Division 4" << '\n'; + } + } +} diff --git a/21-04-2022(Div.4)/B b/21-04-2022(Div.4)/B Binary files differnew file mode 100755 index 0000000..6a9b6ab --- /dev/null +++ b/21-04-2022(Div.4)/B diff --git a/21-04-2022(Div.4)/B.cpp b/21-04-2022(Div.4)/B.cpp new file mode 100644 index 0000000..d1b3e98 --- /dev/null +++ b/21-04-2022(Div.4)/B.cpp @@ -0,0 +1,30 @@ +#include<bits/stdc++.h> + +using namespace std; + +auto solve(map<int, int> m){ + for(auto x : m){ + if(x.second >= 3){ + return x.first; + } + } + return -1; +} + +int main(){ + int tt, x, n; + cin >> tt; + while(tt--){ + map<int, int> frq; + vector<int> v; + cin >> n; + for(int i = 0; i < n; i++){ + cin >> x; + frq[x]++; + } + // for(auto &x : frq){ + // v.push_back(x.second); + // } + cout << solve(frq) << endl; + } +} diff --git a/21-04-2022(Div.4)/E b/21-04-2022(Div.4)/E Binary files differnew file mode 100755 index 0000000..0e57ed4 --- /dev/null +++ b/21-04-2022(Div.4)/E diff --git a/21-04-2022(Div.4)/E.cpp b/21-04-2022(Div.4)/E.cpp new file mode 100644 index 0000000..7fac1a5 --- /dev/null +++ b/21-04-2022(Div.4)/E.cpp @@ -0,0 +1,25 @@ +#include<bits/stdc++.h> + +using namespace std; + +int main(){ + int tt, n, count; + cin >> tt; + while(tt--){ + string str; + cin >> n; + count = 0; + vector<string> v(n); + for(int i = 0; i < n; i++){ + cin >> v[i]; + } + for(int i = 0; i < v.size(); i++){ + for(int j = i+1; j < v.size()-1; j++){ + if(v[i][0] != v[j][0] || v[i][1] != v[j][1]){ + count++; + } + } + } + cout << count << endl; + } +} diff --git a/21-04-2022(Div.4)/F b/21-04-2022(Div.4)/F Binary files differnew file mode 100755 index 0000000..b87fe94 --- /dev/null +++ b/21-04-2022(Div.4)/F diff --git a/21-04-2022(Div.4)/F.cpp b/21-04-2022(Div.4)/F.cpp new file mode 100644 index 0000000..4ab1a8c --- /dev/null +++ b/21-04-2022(Div.4)/F.cpp @@ -0,0 +1,7 @@ +#include<bits/stdc++.h> + +using namespace std; + +int main(){ + +} diff --git a/AlternatingCharachters.py b/AlternatingCharachters.py new file mode 100755 index 0000000..cb0a56c --- /dev/null +++ b/AlternatingCharachters.py @@ -0,0 +1,12 @@ +#!/bin/python3 +t = int(input()) +for i in range(t): + s = input() + count = 0 + for j in range(len(s) - 1): + # print(s[j] == s[j + 1]) + if s[j] == s[j + 1]: + count += 1 + print(count) + + diff --git a/CamelCase.cpp b/CamelCase.cpp new file mode 100644 index 0000000..bbcef3a --- /dev/null +++ b/CamelCase.cpp @@ -0,0 +1,16 @@ +#include<bits/stdc++.h> + +using namespace std; + +int main() { + string s; + int count = 0; + cin >> s; + for(auto ch : s) { + if(isupper(ch)) { + count++; + } + } + cout << count + 1 << '\n'; + return 0; +} diff --git a/Diagonal_Difference.cpp b/Diagonal_Difference.cpp new file mode 100644 index 0000000..cb7c2f2 --- /dev/null +++ b/Diagonal_Difference.cpp @@ -0,0 +1,30 @@ +#include<bits/stdc++.h> + +using namespace std; + +int main(){ + int n; + cin >> n; + vector<int> v1(n); + vector<vector<int>> v2; + for(int i = 0; i < n; i++){ + for(auto &x : v1){ + cin >> x; + cout << "x: " << x << endl; + } + v2.push_back(v1); + } + int dg1 = 0, dg2 = 0; + for(int i = 0; i < n; i++){ + dg1+=v2[i][i]; + } + for(int i = 0; i < n; i++){ + dg2+=v2[i][n-i-1]; + } + cout << abs(dg2 - dg1) << endl; + + + return 0; + +} + diff --git a/Equalize_the_array.cpp b/Equalize_the_array.cpp new file mode 100644 index 0000000..89af0d8 --- /dev/null +++ b/Equalize_the_array.cpp @@ -0,0 +1,19 @@ +#include<bits/stdc++.h> + +using namespace std; + +int main(){ + int n, x; + cin >> n; + map<int, int> mp; + vector<int> freq; + for(int i =0; i < n; i++){ + cin >> x; + mp[x]++; + } + for(auto x : mp){ + freq.push_back(x.second); + } + cout << n - *max_element(freq.begin(), freq.end()) << '\n'; + return 0; +} diff --git a/Flipping_bits.cpp b/Flipping_bits.cpp new file mode 100644 index 0000000..e06235b --- /dev/null +++ b/Flipping_bits.cpp @@ -0,0 +1,16 @@ +#include<bits/stdc++.h> + + +using namespace std; + +int main(){ + int n, x=pow(2, 31) - 1; + cin >> n; + cout << n ^ x; + // 0 0 -> 1 -> 0 + // 1 1 -> 0 -> 1 + // 1 1 -> 0 -> 1 + // 1 1 -> 0 -> 0 + + return 0; +} diff --git a/LisaWorkbook.cpp b/LisaWorkbook.cpp new file mode 100644 index 0000000..6d8532c --- /dev/null +++ b/LisaWorkbook.cpp @@ -0,0 +1,25 @@ +#include <bits/stdc++.h> + +using namespace std; + +int main() +{ + int n, k; + cin >> n >> k; + int pg = 1, res = 0; + for (int i = 0; i < n; i++) { + int np; + cin >> np; + for (int j = 1; j <= np ; j++) { + if (j == pg) { + res++; + } + if (j % k == 0 && j < np) { + pg++; + } + } + pg++; + } + cout << res << endl; + return 0; +} diff --git a/LonelyInteger.cpp b/LonelyInteger.cpp new file mode 100644 index 0000000..a5ce4a4 --- /dev/null +++ b/LonelyInteger.cpp @@ -0,0 +1,12 @@ +#include<bits/stdc++.h> +using namespace std; +int main(){ + int n, x = 0, k; + cin >> n; + for(int i = 0; i < n; i++){ + cin >> k; + x ^= k; + } + cout << x; + return 0; +} diff --git a/Luck_balance.cpp b/Luck_balance.cpp new file mode 100644 index 0000000..403b53f --- /dev/null +++ b/Luck_balance.cpp @@ -0,0 +1,37 @@ +#include<bits/stdc++.h> +using namespace std; +bool comparePair(pair<int, int> p1, pair<int, int> p2){ + if(p1.second >= p2.second && p1.first > p2.first){ + return true; + } + else { + return false; + } +} + +int main() { + int n, k, sum = 0, cn=0; + cin >> n >> k; + vector<pair<int, int>> vp(n); + for(auto &x : vp){ + cin >> x.first >> x.second; + } + sort(vp.begin(), vp.end(), comparePair); + cout << "-----------------------------------"; + cout << endl; + for(auto x : vp){ + cout << x.first << " " << x.second << endl; + } + for(int i = 0; i < n; i++){ + if(vp[i].second == 1){ + cn++; + } + if(cn != k - 1){ + cout << "vp[" << i << "]" << vp[i].first << endl; + sum+=vp[i].first; + } + } + sum -= vp[cn].first; + cout << sum << endl; + return 0; +} diff --git a/MarcCakwalk.cpp b/MarcCakwalk.cpp new file mode 100644 index 0000000..91884fd --- /dev/null +++ b/MarcCakwalk.cpp @@ -0,0 +1,18 @@ +#include<bits/stdc++.h> +using namespace std; +int main(){ + int n; + long sum; + cin >> n; + vector<long> v(n); + for(auto &x : v){ + cin >> x; + } + sort(v.begin(), v.end()); + for(int i = 0; i < n; i++){ + cout << "v[" << i << "] = " << v[i] << " * " << "2^" << n - i - 1 << endl; + sum += v[i] * pow(2, n - i - 1); + } + cout << sum << endl; + return 0; +} diff --git a/MinDiffInArray.cpp b/MinDiffInArray.cpp new file mode 100644 index 0000000..5440d03 --- /dev/null +++ b/MinDiffInArray.cpp @@ -0,0 +1,19 @@ +#include<bits/stdc++.h> +using namespace std; +int main(){ + int n; + cin >> n; + vector<int> v(n); + vector<int> res; + for(auto &x : v){ + cin >> x; + } + sort(v.begin(), v.end()); + for(int i = 0; i < n - 1; i++){ + // 1 2 3 4 5 6 7 + res.push_back(abs(v[i] - v[i+1])); + } + cout << *min_element(res.begin(), res.end()) << endl; + return 0; +} + diff --git a/RecursiveDigitSum.py b/RecursiveDigitSum.py new file mode 100644 index 0000000..4d7dbd7 --- /dev/null +++ b/RecursiveDigitSum.py @@ -0,0 +1,14 @@ +x,n = map(int, input().split()) +x = str(x) +x = x * n +print(x) +def recursive_digit_sum(x): + y = 0 + if len(x) == 1: + return x; + else: + for i in x: + y += int(i) + print("y: ", y) + return recursive_digit_sum(str(y)) +print(recursive_digit_sum(x)) diff --git a/SequenceEquation.cpp b/SequenceEquation.cpp new file mode 100644 index 0000000..1714728 --- /dev/null +++ b/SequenceEquation.cpp @@ -0,0 +1,25 @@ +#include<bits/stdc++.h> + +using namespace std; + +int main(){ + int n, count = 1; + cin >> n; + vector<int> v(n); + map<int, int> mp; + for(auto &x : v){ + cin >> x; + mp[x] = count; + count++; + } + for(auto x : mp){ + auto it = find(v.begin(), v.end(), x.second); + cout << "value: " << x.first << " Index: " << x.second << endl; + cout << it - v.begin() + 1<< endl; + } + + + + + return 0; +} diff --git a/ThePowerSum.cpp b/ThePowerSum.cpp new file mode 100644 index 0000000..7f7e032 --- /dev/null +++ b/ThePowerSum.cpp @@ -0,0 +1,36 @@ +#include<bits/stdc++.h> + +using namespace std; + +int power(int base, int p){ + if(p == 0) { + return 1; + } + return base * (power(base, p - 1)); +} + +vector<int> ans; + +int powerSum(int x, int n, int lastDigit) { + if (x == 0) { + for(int x : ans) { + cout << x << "^" << n << " + "; + } + cout << endl; + return 1; + } + int sum = 0; + for(int i = lastDigit; x - power(i, n) >= 0; i++) { + ans.push_back(i); + sum += powerSum(x - power(i, n), n, i + 1); + ans.pop_back(); + } + return sum; +} + +int main() { + int x, n, count = 0; + cin >> x >> n; + cout << powerSum(x, n, 1) << endl; + return 0; +} diff --git a/chocolateFeast.cpp b/chocolateFeast.cpp new file mode 100644 index 0000000..b7c6fcc --- /dev/null +++ b/chocolateFeast.cpp @@ -0,0 +1,43 @@ +#include<bits/stdc++.h> +using namespace std; +int main(){ + int n, c, m, rem=0, wrap, result, tt, choc; + cin >> tt; + while(tt--){ + cin >> n >> c >> m; + rem = 0; + choc = n / c; + rem += n % c; + result = choc; + wrap = choc; + while(wrap >= m){ + wrap = wrap / m; + result += wrap; + rem += wrap % m; + } + rem += wrap % m; + result += rem / m; + cout << result << endl; + } +} + + + + + + + + + + + + + + + + + + + + + diff --git a/chocolateFeastRevised.cpp b/chocolateFeastRevised.cpp new file mode 100644 index 0000000..edaa983 --- /dev/null +++ b/chocolateFeastRevised.cpp @@ -0,0 +1,19 @@ +#include<bits/stdc++.h> + +using namespace std; + +int main() { + int tt; + cin >> tt; + while (tt--) { + int n, c, m; + cin >> n >> c >> m; + long long ans = n / c, cur = ans; + while (cur >= m) { + ans += cur / m; + cur = (cur % m) + (cur / m); + } + cout << ans << '\n'; + } + return 0; +} diff --git a/cutTheSticks.cpp b/cutTheSticks.cpp new file mode 100644 index 0000000..5c2c700 --- /dev/null +++ b/cutTheSticks.cpp @@ -0,0 +1,63 @@ +#include<bits/stdc++.h> + +using namespace std; + +bool vectorZero(vector<int>& v); +int secondSmallest(vector<int>& v); + +int main(){ + int vsize; + int count=0; + vector<int> vec; + cin >> vsize; + vector<int> result; + for(int i = 0; i < vsize; i++){ + int element; + cin >> element; + vec.push_back(element); + } + sort(vec.begin(), vec.end()); + int mn = *min_element(vec.begin(), vec.end()); + for(int i = 0; i < vsize; i++){ + if(vec[i] != 0){ + vec[i]-= mn; + } + } + cout << vsize; + while(!vectorZero(vec)){ + int ss = vec[secondSmallest(vec)]; + count = 0; + for(int x : vec){ + cout << x << " "; + } + cout << endl; + for(int i = 0; i < vsize; i++){ + if(vec[i] != 0){ + vec[i] -= ss; + count++; + } + } + cout << count << endl; + } + return 0; +} + + +bool vectorZero(vector<int>& v){ + int count = 0; + for(int i = 0; i < v.size(); i++){ + if(v[i] == 0){ + count++; + } + } + return count == v.size(); +} + +int secondSmallest(vector<int>& v){ + for(int i = 0; i < v.size(); i++){ + if(v[i] != *min_element(v.begin(), v.end())){ + return i; + } + } + return -1; +} diff --git a/cutTheSticksJoe.cpp b/cutTheSticksJoe.cpp new file mode 100644 index 0000000..4504062 --- /dev/null +++ b/cutTheSticksJoe.cpp @@ -0,0 +1,21 @@ +#include <bits/stdc++.h> + +using namespace std; + +int main() { + ios::sync_with_stdio(false); + cin.tie(0); + int n; + cin >> n; + map<int, int> mp; + for (int i = 0; i < n; i++) { + int x; + cin >> x; + ++mp[x]; + } + for (auto p : mp) { + cout << n << '\n'; + n -= p.second; + } + return 0; +} diff --git a/cutTheSticksRevised.cpp b/cutTheSticksRevised.cpp new file mode 100644 index 0000000..0d63fb4 --- /dev/null +++ b/cutTheSticksRevised.cpp @@ -0,0 +1,10 @@ +#include<bits/stdc++.h> + +using namespace std; + +int main(){ + + + + return 0; +} diff --git a/iceCreamParlor.cpp b/iceCreamParlor.cpp new file mode 100644 index 0000000..eb29391 --- /dev/null +++ b/iceCreamParlor.cpp @@ -0,0 +1,38 @@ +#include<bits/stdc++.h> + +using namespace std; + +bool cleanVec(vector<int> v){ + sort(v.begin(), v.end()); + for(int i = 0; i < v.size() - 1; i++) { + if(v[i] == v[i + 1]) { + return true; + } + } + return false; +} + +int |
