In B for the case when David is between teachers we know that David is going to the middle of left and right values optimally so we can just use that and our answer will be min(distance of mid from left, distance of mid from right)
For A. i created an empty string s, and a vowels consisting all vowels, then ran a looop from i to n and added vowels[i%%5] to the s string , and at last sorted the s string , and all done .
For A we can just use a frequency array and set count of every vowel as n/5 and then increase each vowel for each extra required ie n%5, and use ans+=string (freq[i], vowel [i])
@@hitesh1800 #include using namespace std; #define ll long long int main(){ int t; cin>>t; while(t--){ int n;cin>>n; string str=""; string vowel="aeiou"; if(n>5){ int freq1=n/5; int extra=n%5; vector freq(5); for(int i=0;i
@@hitesh1800 #include using namespace std; #define ll long long int main(){ int t; cin>>t; while(t--){ int n;cin>>n; string str=""; string vowel="aeiou"; if(n>5){ int freq1=n/5; int extra=n%5; vector freq(5); for(int i=0;i
@@hitesh1800 #include using namespace std; #define ll long long int main(){ int t; cin>>t; while(t--){ int n;cin>>n; string str=""; string vowel="aeiou"; if(n>5){ int freq1=n/5; int extra=n%5; vector freq(5); for(int i=0;i
I'm not getting B1 at all . If the teachers are moving simulatenously then the gap just keeps increasing lets say we have the teachers at 2 and 60 and david at 4 . Now if the teachers want to close in the gap , if one teacher goes to 3 the other teacher will go to 61 . Like david can keep going ahead in the case . How will the gap close ? if we are moving david to the middle how will the gap close ??
Its not necessary that all teachers move in the same direction. 2 teachers can move in different directions. So one teacher would move to 3 and the other to 59
@@gaurishbaliga3723 Oh shoot . I read the statement wrong sorry . After your comment I tried to configure out the approach by myself I don't get it why it's wrong can you please help me ?? What I'm basically doing is calculating the middle value of both the teachers for the last case . T1 + T2 / 2 and then I know that david will definitely move to this middle value and those steps would be counted and also along with that the distance between the min teacher and david will also be counted . So the final distance is (T1 + T2)/2 + minDis of david from either of the teacher . I tried really hard to find the issue but I can't think of any : (
Bro, Recently Open AI launched their new model which can solve codeforces problem rated upto 1600 -1800 with ease , there are a lot of cheaters which will use this for their advantage . But for tier3 person getting a good rank will help in getting referral for off campus placements . People who don't want to cheat focus solely on improving their problem solving and get good ranks which ultimately help in getting referrals , but due to cheating all these rankings will be considered of no use because there might be some people who have cheated to get those ranks . So what should we do . Please have some discussion on it . Will there be any credibility of these ratings in futures or all hardwork will go in vain .
Cheaters can solve using AI in contests but will struggle in interviews... So just Focus on improving ourselves rather than focusing on the rank we get in the contests
@@anonymousduel7370 Bro , actually it's not about IIT , NIT or IIIT or any tier 3 college . It's more about the credibility of those rankings or ratings . At the end , who will suffer especially the hard working ones .
Please fill the Feedback form for PCD: forms.gle/7bQH8sLcTpFDQGU26
best ever PCD ❣
keep him in every pcd please😭
this teacher ka solution daily chai
In B for the case when David is between teachers we know that David is going to the middle of left and right values optimally so we can just use that and our answer will be min(distance of mid from left, distance of mid from right)
For A. i created an empty string s, and a vowels consisting all vowels, then ran a looop from i to n and added vowels[i%%5] to the s string , and at last sorted the s string , and all done .
nice solution and elegant explanation
For solution B1 & B2 -
if (right ==m ) cout
For A we can just use a frequency array and set count of every vowel as n/5 and then increase each vowel for each extra required ie n%5, and use ans+=string (freq[i], vowel [i])
would u please provide me your code
@@hitesh1800 #include
using namespace std;
#define ll long long
int main(){
int t;
cin>>t;
while(t--){
int n;cin>>n;
string str="";
string vowel="aeiou";
if(n>5){
int freq1=n/5;
int extra=n%5;
vector freq(5);
for(int i=0;i
@@hitesh1800 #include
using namespace std;
#define ll long long
int main(){
int t;
cin>>t;
while(t--){
int n;cin>>n;
string str="";
string vowel="aeiou";
if(n>5){
int freq1=n/5;
int extra=n%5;
vector freq(5);
for(int i=0;i
@@hitesh1800 #include
using namespace std;
#define ll long long
int main(){
int t;
cin>>t;
while(t--){
int n;cin>>n;
string str="";
string vowel="aeiou";
if(n>5){
int freq1=n/5;
int extra=n%5;
vector freq(5);
for(int i=0;i
Thank you so much
Upsolving A & B
will the approach to C work if the strings have different lengths?
In your C solution you also get WA just bcz of not taking letter in a variable name temp . But I don't understand why. Can you please tell why?
PLEASE UPLOAD ATCODER SOLUTIONS ALSO😭
for the first question i used this :
cout
I'm not getting B1 at all . If the teachers are moving simulatenously then the gap just keeps increasing lets say we have the teachers at 2 and 60 and david at 4 . Now if the teachers want to close in the gap , if one teacher goes to 3 the other teacher will go to 61 . Like david can keep going ahead in the case . How will the gap close ? if we are moving david to the middle how will the gap close ??
Its not necessary that all teachers move in the same direction. 2 teachers can move in different directions. So one teacher would move to 3 and the other to 59
@@gaurishbaliga3723 Oh shoot . I read the statement wrong sorry . After your comment I tried to configure out the approach by myself I don't get it why it's wrong can you please help me ?? What I'm basically doing is calculating the middle value of both the teachers for the last case . T1 + T2 / 2 and then I know that david will definitely move to this middle value and those steps would be counted and also along with that the distance between the min teacher and david will also be counted . So the final distance is (T1 + T2)/2 + minDis of david from either of the teacher . I tried really hard to find the issue but I can't think of any : (
Bro,
Recently Open AI launched their new model which can solve codeforces problem rated upto 1600 -1800 with ease , there are a lot of cheaters which will use this for their advantage . But for tier3 person getting a good rank will help in getting referral for off campus placements . People who don't want to cheat focus solely on improving their problem solving and get good ranks which ultimately help in getting referrals , but due to cheating all these rankings will be considered of no use because there might be some people who have cheated to get those ranks . So what should we do . Please have some discussion on it . Will there be any credibility of these ratings in futures or all hardwork will go in vain .
Cheaters can solve using AI in contests but will struggle in interviews...
So just Focus on improving ourselves rather than focusing on the rank we get in the contests
Then tell your tier 3 groups to stop cheating cause it's not iit nit iiit guys that used to cheat (even if they did numbers were still low)
If your sole purpose of cp is landing a job then lets be honest even you would have cheated atleast once in your life in cp.
@@anonymousduel7370 Bro , actually it's not about IIT , NIT or IIIT or any tier 3 college .
It's more about the credibility of those rankings or ratings . At the end , who will suffer especially the hard working ones .
@@sachinboreoffl Yes you are saying correct .
how is solution to the problem C is getting accepted?
tc->O(n*m*5*t)==10^11??
The sum of all n * m over all testcases is
Because of the constraint "The sum of values of n⋅m over all test cases does not exceed 1e6."
So over all TCs we have Summation(n*m)
this teacher ka solution daily chai
this teacher ka solution daily chai