Skip to content

Commit

Permalink
Merge pull request #74 from Maykkkk/Maykkkk-patch-1
Browse files Browse the repository at this point in the history
Added Research presentation
  • Loading branch information
Swastyy authored Oct 3, 2023
2 parents c24bf41 + 82d8e89 commit 98fcbc6
Show file tree
Hide file tree
Showing 110 changed files with 1,237 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Codeforces/codeforces.cpp/.vs/ProjectSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"CurrentProjectSetting": "No Configurations"
}
6 changes: 6 additions & 0 deletions Codeforces/codeforces.cpp/.vs/VSWorkspaceState.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"ExpandedNodes": [
""
],
"PreviewInSolutionExplorer": false
}
Binary file not shown.
Binary file not shown.
Binary file added Codeforces/codeforces.cpp/.vs/slnx.sqlite
Binary file not shown.
21 changes: 21 additions & 0 deletions Codeforces/codeforces.cpp/1.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

#inciude<iostream>
using namespace std;
int main() {
int rating;
cin >> rating
if (rating <= 1399) {
cout << 'Division 4'
}
elseif(1400 <= rating <= 1599) {
cout << 'Division 3'
}
elseif(1600 <= rating <= 1899) {
cout << 'Division 4'
}
else(1900 <= rating) {
cout << 'Division 1'
}
return 0;
}

Binary file not shown.
Binary file not shown.
3 changes: 3 additions & 0 deletions Codeforces/codeforces.cpp/2code.cpp/.vs/ProjectSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"CurrentProjectSetting": "No Configurations"
}
7 changes: 7 additions & 0 deletions Codeforces/codeforces.cpp/2code.cpp/.vs/VSWorkspaceState.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"ExpandedNodes": [
""
],
"SelectedNode": "\\Source1.cpp",
"PreviewInSolutionExplorer": false
}
Binary file not shown.
19 changes: 19 additions & 0 deletions Codeforces/codeforces.cpp/2code.cpp/Source1.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#inciude<iostream>
using namespace std;
int main() {
int rating;
cin >> rating
if (rating <= 1399) {
cout << 'Division 4'
}
elseif(1400 <= rating <= 1599) {
cout << 'Division 3'
}
elseif(1600 <= rating <= 1899) {
cout << 'Division 4'
}
else(1900 <= rating) {
cout << 'Division 1'
}
return 0;
}
1 change: 1 addition & 0 deletions Codeforces/codeforces.cpp/68.c
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

20 changes: 20 additions & 0 deletions Codeforces/codeforces.cpp/A. Array Coloring.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#include<stdio.h>
using namespace std;
int main(){
int t;
cin>>t;
while(t--){
int n;
cin>>n;
int arr[n];
int sum=0;
for(i:arr){
cin>>arr[i];
}
for(int i=0; i<n; i++){
sum+=arr[i];
}
if(sum%2==0) return Yes;
else{return No;}
}
}
20 changes: 20 additions & 0 deletions Codeforces/codeforces.cpp/A. Cipher Shifer.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#include<stdio.h>
using namespace std;
int main(){
int t;
cin>>t;
while(t--){
int n;
cin>>n;
int arr[n];
int sum=0;
for(i:arr){
cin>>arr[i];
}
for(int i=0; i<n; i++){
sum+=arr[i];
}
if(sum%2==0) return Yes;
else{return No;}
}
}
Binary file added Codeforces/codeforces.cpp/A. Cipher Shifer.exe
Binary file not shown.
Binary file added Codeforces/codeforces.cpp/A. Cipher Shifer.o
Binary file not shown.
30 changes: 30 additions & 0 deletions Codeforces/codeforces.cpp/A. Cipher Shifer1.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#include <iostream>
#include <string>

using namespace std;

string decryptString(string s) {
string result = "";

for (int i = 0; i < s.length(); i += 2) {
result += s[i];
}

return result;
}
int main(){
int t;
cin>>t;
while(t--){
int n;
cin>>n;
string s;
cout << "Enter the encrypted string: ";
cin >> s;

string decryptedString = decryptString(s);
cout << "Decrypted string: " << decryptedString << endl;

return 0;
}
}
Binary file added Codeforces/codeforces.cpp/A. Cipher Shifer1.exe
Binary file not shown.
Binary file added Codeforces/codeforces.cpp/A. Cipher Shifer1.o
Binary file not shown.
32 changes: 32 additions & 0 deletions Codeforces/codeforces.cpp/A. Divisible Array.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#include<bits/stdc++.h>
using namespace std;
int main(){
int t;
cin>>t;
while(t--){
int n;
cin>>n;
cout<<endl;
int arr[n];
if(n%2==0){
for(int i=0;i<n;i++){
arr[i]=((i+1)*2);

}
for(int j=0;j<n;j++){
cout<<arr[j]<<" ";
}
}
else if(n%2!=0){
for(int i=0;i<n;i++){
arr[i]=((i+1));

}
for(int j=0;j<n;j++){
cout<<arr[j]<<" ";
}
}


}
}
Binary file not shown.
Binary file added Codeforces/codeforces.cpp/A. Divisible Array.o
Binary file not shown.
13 changes: 13 additions & 0 deletions Codeforces/codeforces.cpp/A. Game with Board.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#include<bits/stdc++.h>
using namespace std;
int main(){
int t;
cin>>t;
while(t--){
int n;
cin>>n;
if(n==2 || n==99) cout<<"Bob"<<endl;
cout<<"Bob";
else{cout<<"Alice"<<endl;}
}
}
Binary file added Codeforces/codeforces.cpp/A. Game with Board.exe
Binary file not shown.
Binary file added Codeforces/codeforces.cpp/A. Game with Board.o
Binary file not shown.
18 changes: 18 additions & 0 deletions Codeforces/codeforces.cpp/A. Grasshopper on a Line.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#include<bits/stdc++.h>
using namespace std;
int main(){
int t;
cin>>t;
while(t--){
int x,k;
cin>>x>>k;
if(x<k || x%k!=0){
cout<<1<<endl<<x<<endl;
}
else{
cout<<2<<endl<<(x-1)<<" "<<1<<endl;
}

}
return 0;
}
Binary file not shown.
Binary file not shown.
35 changes: 35 additions & 0 deletions Codeforces/codeforces.cpp/A. MEXanized Array.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#include<iostream>
#include<vector>
#define ll long long
using namespace std;

int main() {
int t;
cin >> t;
while (t--) {
long long n, k, x;
cin >> n >> k >> x;
ll sum = 0;

if (k > n || k - 1 > x) {
cout << -1 << endl; // Print -1 when conditions are not met
}
else {
for (int i = 1; i < k; i++) {
sum+=i;
}
if(k>=x){
for (int j = 0; j < n - k; j++) {
sum+= (k-1);
}
}
else{
for (int l = 0; l < n-k; l++) {
sum += x;
}
}
cout << sum << endl; // Corrected to add 'n' to the sum
}
}
return 0;
}
Binary file added Codeforces/codeforces.cpp/A. MEXanized Array.exe
Binary file not shown.
Binary file added Codeforces/codeforces.cpp/A. MEXanized Array.o
Binary file not shown.
15 changes: 15 additions & 0 deletions Codeforces/codeforces.cpp/A. Musical Puzzle.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#include<bits/stdc++.h>
using namespace std;
int main(){
int t;
cin>>t;
while(t--){
int n, i, j;
cin>>n;
string s;
cin>>s;
int count=0;

}
return 0;
}
Binary file added Codeforces/codeforces.cpp/A. Musical Puzzle.exe
Binary file not shown.
Binary file added Codeforces/codeforces.cpp/A. Musical Puzzle.o
Binary file not shown.
24 changes: 24 additions & 0 deletions Codeforces/codeforces.cpp/A. Twin Permutations.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#include<bits/stdc++.h>
using namespace std;
int main(){
int t;
cin>>t;
while(t--){
int n, a[n], b[n];
cin>>n;
for(int i=0; i<n; i++){
cin>>a[i];
}
for(int j=0; j<n; j++){
if(a[j]<a[j+1]){
cout<<a[j]<<" ";
}
else{
sort(a, a + n);
}
}
cout<<a[n]<<" ";
cout<<endl;
}
return 0;
}
Binary file not shown.
Binary file added Codeforces/codeforces.cpp/A. Twin Permutations.o
Binary file not shown.
34 changes: 34 additions & 0 deletions Codeforces/codeforces.cpp/B. Comparison String.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#include<bits/stdc++.h>
using namespace std;
int main(){
int t;
cin>>t;
while(t--){
int n;
cin>>n;
string s;
cin>>s;
int a[n+1];
a[0]=1;
for(int i=0;i<n;i++){
if(s[i]=='<'){
a[i+1]=a[i]+1;
}
else{
a[i+1]=a[i]-1;
}

}
sort(a,a+n+1);
int ans=1;
for(int j=0; j<n; j++){
if(a[j]!=a[j+1]){
ans++;
}
}
cout<<ans<<endl;


}
return 0;
}
Binary file not shown.
Binary file added Codeforces/codeforces.cpp/B. Comparison String.o
Binary file not shown.
35 changes: 35 additions & 0 deletions Codeforces/codeforces.cpp/B. Comparison String1.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#include<bits/stdc++.h>
using namespace std;
int main(){
int t;
cin>>t;
while(t--){
int n;
cin>>n;
string s;
cin>>s;
int ind, wid;
for(int i=0;i<n;i++){
if(s[i]=='>' || s[i]=='<'){
cout<<n+1;
}
else if((s[i]=='<' && s[i+1]=='>') || (s[i]=='>' && s[i+1]=='<')){
cout<<2;
}
}
for(int j=0;j<n;j++){
if(s[i]=='<' && s[i+1]=='>'){
ind=i;
}
else if(s[i]=='>' && s[i+1]=='<'){
wid=i;
}
}
for(int k=i;k<n;k++){

}


}
return 0;
}
Loading

0 comments on commit 98fcbc6

Please sign in to comment.