-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #74 from Maykkkk/Maykkkk-patch-1
Added Research presentation
- Loading branch information
Showing
110 changed files
with
1,237 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"CurrentProjectSetting": "No Configurations" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"CurrentProjectSetting": "No Configurations" | ||
} |
7 changes: 7 additions & 0 deletions
7
Codeforces/codeforces.cpp/2code.cpp/.vs/VSWorkspaceState.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"ExpandedNodes": [ | ||
"" | ||
], | ||
"SelectedNode": "\\Source1.cpp", | ||
"PreviewInSolutionExplorer": false | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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;} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |
Oops, something went wrong.