diff options
22 files changed, 64 insertions, 8 deletions
diff --git a/ParanormixPredictions/inp b/ParanormixPredictions/inp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/ParanormixPredictions/inp diff --git a/ParanormixPredictions/main b/ParanormixPredictions/main Binary files differnew file mode 100755 index 0000000..eddd98f --- /dev/null +++ b/ParanormixPredictions/main diff --git a/ParanormixPredictions/main.cpp b/ParanormixPredictions/main.cpp new file mode 100644 index 0000000..771fafc --- /dev/null +++ b/ParanormixPredictions/main.cpp @@ -0,0 +1,25 @@ +#include<bits/stdc++.h> + +using namespace std; + +int main () { + ios_base::sync_with_stdio(false); + cin.tie(NULL); + int n, m; + cin >> n >> m; + vector<int> primes; + for(int i = 2; i <= 50;i++) { + bool ok = 1; + for(int j = 2; j * j <= i; j++) { + if(i % j == 0) { + ok = 0; + break; + } + } + if(ok) { + primes.push_back(i); + } + } + int indx = (upper_bound(primes.begin(), primes.end(), n) - primes.begin()); + (m == primes[indx]) ? cout << "YES" : cout << "NO"; +} diff --git a/ParanormixPredictions/main_input0.txt b/ParanormixPredictions/main_input0.txt new file mode 100644 index 0000000..99818b5 --- /dev/null +++ b/ParanormixPredictions/main_input0.txt @@ -0,0 +1 @@ +3 5 diff --git a/ParanormixPredictions/main_input1.txt b/ParanormixPredictions/main_input1.txt new file mode 100644 index 0000000..156c178 --- /dev/null +++ b/ParanormixPredictions/main_input1.txt @@ -0,0 +1 @@ +7 11 diff --git a/ParanormixPredictions/main_input2.txt b/ParanormixPredictions/main_input2.txt new file mode 100644 index 0000000..a5b6096 --- /dev/null +++ b/ParanormixPredictions/main_input2.txt @@ -0,0 +1 @@ +7 9 diff --git a/ParanormixPredictions/main_output0.txt b/ParanormixPredictions/main_output0.txt new file mode 100644 index 0000000..f033a50 --- /dev/null +++ b/ParanormixPredictions/main_output0.txt @@ -0,0 +1 @@ +YES diff --git a/ParanormixPredictions/main_output1.txt b/ParanormixPredictions/main_output1.txt new file mode 100644 index 0000000..f033a50 --- /dev/null +++ b/ParanormixPredictions/main_output1.txt @@ -0,0 +1 @@ +YES diff --git a/ParanormixPredictions/main_output2.txt b/ParanormixPredictions/main_output2.txt new file mode 100644 index 0000000..5e35d1b --- /dev/null +++ b/ParanormixPredictions/main_output2.txt @@ -0,0 +1 @@ +NO diff --git a/StonesOnTheTable/main b/StonesOnTheTable/main Binary files differindex 800895c..5fd7d80 100755 --- a/StonesOnTheTable/main +++ b/StonesOnTheTable/main diff --git a/StonesOnTheTable/main.cpp b/StonesOnTheTable/main.cpp index b7bf69e..a9903c9 100644 --- a/StonesOnTheTable/main.cpp +++ b/StonesOnTheTable/main.cpp @@ -9,13 +9,11 @@ int main () { cin >> n; string s; cin >> s; - map<char, int> mp; - for(auto ch : s) { - mp[ch]++; + int count = 0; + for(int i = 0; i < s.size() - 1;i++) { + if(s[i] == s[i + 1]) { + count++; + } } - int mx = 0; - for(auto p : mp) { - mx = max(p.second, mx); - } - cout << mx - 1 << endl; + cout << count << endl; } diff --git a/UltraFastMathmatician/inp b/UltraFastMathmatician/inp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/UltraFastMathmatician/inp diff --git a/UltraFastMathmatician/main b/UltraFastMathmatician/main Binary files differnew file mode 100755 index 0000000..9553c2a --- /dev/null +++ b/UltraFastMathmatician/main diff --git a/UltraFastMathmatician/main.cpp b/UltraFastMathmatician/main.cpp new file mode 100644 index 0000000..83ef653 --- /dev/null +++ b/UltraFastMathmatician/main.cpp @@ -0,0 +1,15 @@ +#include<bits/stdc++.h> + +using namespace std; + +int main () { + ios_base::sync_with_stdio(false); + cin.tie(NULL); + string s1, s2; + cin >> s1 >> s2; + string ans=""; + for(int i = 0; i < s1.size(); i++) { + ans+=((s1[i] - '0') ^ (s2[i] - '0') + '0'); + } + cout << ans << endl; +} diff --git a/UltraFastMathmatician/main_input0.txt b/UltraFastMathmatician/main_input0.txt new file mode 100644 index 0000000..4443be3 --- /dev/null +++ b/UltraFastMathmatician/main_input0.txt @@ -0,0 +1,2 @@ +1010100 +0100101 diff --git a/UltraFastMathmatician/main_input1.txt b/UltraFastMathmatician/main_input1.txt new file mode 100644 index 0000000..8156dd5 --- /dev/null +++ b/UltraFastMathmatician/main_input1.txt @@ -0,0 +1,2 @@ +000 +111 diff --git a/UltraFastMathmatician/main_input2.txt b/UltraFastMathmatician/main_input2.txt new file mode 100644 index 0000000..e530a3e --- /dev/null +++ b/UltraFastMathmatician/main_input2.txt @@ -0,0 +1,2 @@ +1110 +1010 diff --git a/UltraFastMathmatician/main_input3.txt b/UltraFastMathmatician/main_input3.txt new file mode 100644 index 0000000..bd9a857 --- /dev/null +++ b/UltraFastMathmatician/main_input3.txt @@ -0,0 +1,2 @@ +01110 +01100 diff --git a/UltraFastMathmatician/main_output0.txt b/UltraFastMathmatician/main_output0.txt new file mode 100644 index 0000000..a5e2249 --- /dev/null +++ b/UltraFastMathmatician/main_output0.txt @@ -0,0 +1 @@ +1110001 diff --git a/UltraFastMathmatician/main_output1.txt b/UltraFastMathmatician/main_output1.txt new file mode 100644 index 0000000..58c9bdf --- /dev/null +++ b/UltraFastMathmatician/main_output1.txt @@ -0,0 +1 @@ +111 diff --git a/UltraFastMathmatician/main_output2.txt b/UltraFastMathmatician/main_output2.txt new file mode 100644 index 0000000..e199843 --- /dev/null +++ b/UltraFastMathmatician/main_output2.txt @@ -0,0 +1 @@ +0100 diff --git a/UltraFastMathmatician/main_output3.txt b/UltraFastMathmatician/main_output3.txt new file mode 100644 index 0000000..f7194c0 --- /dev/null +++ b/UltraFastMathmatician/main_output3.txt @@ -0,0 +1 @@ +00010 |
