Skip to main content

Equal Beauty CodeChef SnackDown 2021 Round 1A

 Equal Beauty CodeChef SnackDown 2021 Round 1A Question The beauty of an (non-empty) array of integers is defined as the difference between its largest and smallest element. For example, the beauty of the array [2,3,4,4,6] is 6−2=4. An array A is said to be good if it is possible to partition the elements of A into two non-empty arrays B1 and B2 such that B1 and B2 have the same beauty. Each element of array A should be in exactly one array: either in B1 or in B2. For example, the array [6,2,4,4,4] is good because its elements can be partitioned into two arrays B1=[6,4,4] and B2=[2,4], where both B1 and B2 have the same beauty (6−4=4−2=2). You are given an array A of length N. In one move you can: Select an index i (1≤i≤N) and either increase Ai by 1 or decrease Ai by 1. Find the minimum number of moves required to make the array A good. Input Format The first line of input contains a single integer T, denoting the number of test cases. The description of T test cases follow. Each test

Codeforces Round 746 Div 2 Editorial Solutions A - D

Codeforces Round 746 Div 2 Editorial Solutions A - D


Gamer Hermose

One day, Ahmed_Hossam went to Hemose and said "Let's solve a gym contest!". Hemose didn't want to do that, as he was playing Valorant, so he came up with a problem and told it to Ahmed to distract him. Sadly, Ahmed can't solve it... Could you help him?

There is an Agent in Valorant, and he has  weapons. The -th weapon has a damage value  and the Agent will face an enemy whose health value is 

The Agent will perform one or more moves until the enemy dies.

In one move, he will choose a weapon and decrease the enemy's health by its damage value. The enemy will die when his health will become less than or equal to . However, not everything is so easy: the Agent can't choose the same weapon for  times in a row.

What is the minimum number of times that the Agent will need to use the weapons to kill the enemy?

Input

Each test contains multiple test cases. The first line contains the number of test cases t . Description of the test cases follows.

The first line of each test case contains two integers  and   — the number of available weapons and the initial health value of the enemy.

The second line of each test case contains  integers (1— the damage values of the weapons.

It's guaranteed that the sum of  over all test cases doesn't exceed 

Output

For each test case, print a single integer — the minimum number of times that the Agent will have to use the weapons to kill the enemy.

Example
input
Copy
3
2 4
3 7
2 6
4 2
3 11
2 1 7
output
Copy
1
2
3
Note

In the first test case, the Agent can use the second weapon, making health value of the enemy equal to  so the enemy is dead, and using weapon  time was enough.

In the second test case, the Agent can use the first weapon first, and then the second one. After this, the health of enemy will drop to , meaning he would be killed after using weapons  times.

In the third test case, the Agent can use the weapons in order (third, first, third), decreasing the health value of enemy to  after using the weapons  times. Note that we can't kill the enemy by using the third weapon twice, as even though , it's not allowed to use the same weapon twice in a row.

 Program Code

#include<bits/stdc++.h>
using namespace std;
#define fast ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define ll long long int
#define dbg(a,b,c) cout<<a<<"  "<<b<<"  "<<c<<endl;
#define mem(a,b) memset(a,b,sizeof(a))
#define endl "\n"
#define INF 1e18
#define w(t) cin>>t;while(t--)
#define kill(a) {cout<<a<<endl;continue;}
#define pi  2 * acos(0.0)
int t,ans=0,tot=0,kk=0;
const int mxn=2e5+10,mod=1e9+7;
 
signed main()
{
    
    w(t)
    {
        ll n,m,a,b,c,d,e,i,j,k,sm=0,sm1=0,cn=0,cn1=0,mx=-1e9,mn=1e9;
        string s,ss,sr,sa;
        bool f=false,ff=true;
        cin>>n>>m;
        ll ar[n];
        for(i=0;i<n;i++)cin>>ar[i];
        sort(ar,ar+n,greater<ll>());
        sm=ar[0]+ar[1];
        cn=m/sm;cn1=cn;
        cn*=2;
        m-=(cn1*sm);
        if(m>0)
        {
            cn++;
            m-=ar[0];
            if(m>0)cn++;
        }
        cout<<cn<<endl;
    }
}

Hermose Shopping

Hemose was shopping with his friends Samez, AhmedZ, AshrafEzz, TheSawan and O_E in Germany. As you know, Hemose and his friends are problem solvers, so they are very clever. Therefore, they will go to all discount markets in Germany.

Hemose has an array of  integers. He wants Samez to sort the array in the non-decreasing order. Since it would be a too easy problem for Samez, Hemose allows Samez to use only the following operation:

  • Choose indices  and  such that , and .Then, swap elements  and 

Can you tell Samez if there's a way to sort the array in the non-decreasing order by using the operation written above some finite number of times (possibly 0)?


Input

Each test contains multiple test cases. The first line contains the number of test cases  . Description of the test cases follows.

The first line of each test case contains two integers  and  

The second line of each test case contains  integers  .

It is guaranteed that the sum of  over all test cases doesn't exceed .


Output

For each test case, you should output a single string.

If Samez can sort the array in non-decreasing order using the operation written above, output "YES" (without quotes). Otherwise, output "NO" (without quotes).

You can print each letter of "YES" and "NO" in any case (upper or lower).

Example
input
Copy
4
3 3
3 2 1
4 3
1 2 3 4
5 2
5 1 2 3 4
5 4
1 2 3 4 4
output
Copy
NO
YES
YES
YES
Note

In the first test case, you can't do any operations.

In the second test case, the array is already sorted.

In the third test case, you can do the operations as follows:



  •  




(Here  refers to swapping elements at positions ).

Program Code

#include<bits/stdc++.h>
using namespace std;
typedef pair<int, int > pii;
const int N = 1e5+10;
 
pii a[N];
int b[N];
int n, x;
 
int finda(int x) {
    return lower_bound(b, b+n, x) - b;
}
 
int findb(int x) {
    return upper_bound(b, b+n, x) - b;
}
 
int main() {
    int T;
    scanf("%d", &T);
 
    while(T -- ) {
        scanf("%d%d", &n, &x);
        for(int i = 0; i < n; i++) scanf("%d", &a[i].first), a[i].second = i;
 
        sort(a, a+n);
 
        for(int i = 0; i < n; i++) b[i] = a[i].first;
 
        int flag = 1;
        for(int i = 0; flag && i < n; i++) {
            int idx = a[i].second;
            int aa = finda(a[i].first), bb = findb(a[i].first) - 1;
            if(aa <= idx && idx <= bb) continue;
            if(idx >= x || n-1-idx >= x) continue;
            flag = 0;
        }
        if(flag) puts("YES");
        else puts("NO");
    }
    return 0;
}
 

Bakery and Partitioning

Bakry faced a problem, but since he's lazy to solve it, he asks for your help.

You are given a tree of  nodes, the -th node has value  assigned to it for each  from  to . As a reminder, a tree on  nodes is a connected graph with edges.

You want to delete at least , but at most  edges from the tree, so that the following condition would hold:

  • For every connected component calculate the bitwise XOR of the values of the nodes in it. Then, these values have to be the same for all connected components.

Is it possible to achieve this condition?

Input

Each test contains multiple test cases. The first line contains the number of test cases  . Description of the test cases follows.

The first line of each test case contains two integers  and  .

The second line of each test case contains n integers  .

The -th of the next  lines contains two integers  and  (), which means that there's an edge between nodes  and .

It is guaranteed that the given graph is a tree.

It is guaranteed that the sum of  over all test cases doesn't exceed .

Output

For each test case, you should output a single string. If you can delete the edges according to the conditions written above, output "YES" (without quotes). Otherwise, output "NO" (without quotes).

You can print each letter of "YES" and "NO" in any case (upper or lower).

Example
input
Copy
5
2 2
1 3
1 2
5 5
3 3 3 3 3
1 2
2 3
1 4
4 5
5 2
1 7 2 3 5
1 2
2 3
1 4
4 5
5 3
1 6 4 1 2
1 2
2 3
1 4
4 5
3 3
1 7 4
1 2
2 3
output
Copy
NO
YES
NO
YES
NO
Note

It can be shown that the objection is not achievable for first, third, and fifth test cases.

In the second test case, you can just remove all the edges. There will be  connected components, each containing only one node with value , so the bitwise XORs will be  for all of them.

In the fourth test case, this is the tree:Codeforces Round 746 Div 2 Editorial.

You can remove an edge 

The bitwise XOR of the first component will be,  ( ) denotes the bitwise XOR).

The bitwise XOR of the second component will be, .

Program Code

#include <bits/stdc++.h>
using namespace std;

#define ll long long
#define nl '\n'


vector<vector<int>> g;
vector<ll> a;
ll all;
int k;

ll dfs2(int v, int par, int bad, bool& good, ll val) {
    ll res = a[v];
    for(int ne : g[v]) {
        if(ne == par || ne == bad) {
            continue;
        }
        res ^= dfs2(ne, v, bad, good, val);
    }

    ll rest = all;
    if(rest == res && res == val) {
        if(par != -1 && k >= 3) {
            good = true;
        }
    }

    return res;
}



ll dfs(int v, int par, bool& good) {
    ll res = a[v];
    vector<ll> vec;
    for(int ne: g[v]) {
        if(ne == par) {
            continue;
        }
        vec.push_back(dfs(ne, v, good));
        res ^= vec.back();
    }
    ll rest = all ^ res;

    if((rest == res)) {
        if(par != -1) {
            good = true;
        }
    }
    else if((res == all) && (rest == 0)) {
        if(par != -1) {
            bool good2 = false;
            dfs2(0, -1, v, good2, res);
            if(good2) {
                good = true;
            }
        }
    }

    return res;
}


void solve() {
    int n;
    cin >> n >> k;

    g.clear();
    a.clear();
    a.resize(n);
    all = 0;
    g.resize(n);
    set<int> ss;
    for(int i = 0; i < n; i++) {
        cin >> a[i];
        all ^= a[i];
        ss.insert(a[i]);
    }

    for(int i = 0; i < n - 1; i++) {
        int u, v;
        cin >> u >> v;
        u--, v--;
        g[u].push_back(v);
        g[v].push_back(u);
    }

    bool ok = false;
    dfs(0, -1, ok);

    cout << (ok ? "Yes" : "No") << nl;
}

int main() {

    ios_base::sync_with_stdio(false);
    cin.tie(0); cout.tie(0);


    int t;
    cin >> t;
    while(t--) {
        solve();
    }

    return 0;
}

Hermose in  ICPC

This is an interactive problem!

In the last regional contest Hemose, ZeyadKhattab and YahiaSherif — members of the team Carpe Diem — did not qualify to ICPC because of some unknown reasons. Hemose was very sad and had a bad day after the contest, but ZeyadKhattab is very wise and knows Hemose very well, and does not want to see him sad.

Zeyad knows that Hemose loves tree problems, so he gave him a tree problem with a very special device.

Hemose has a weighted tree with  nodes and  edges. Unfortunately, Hemose doesn't remember the weights of edges.

Let's define for  as the greatest common divisor of the weights of all edges on the path from node  to node .

Hemose has a special device. Hemose can give the device a set of nodes, and the device will return the largest  between any two nodes from the set. More formally, if Hemose gives the device a set  of nodes, the device will return the largest value of  over all pairs  with    and 

Hemose can use this Device at most  times, and wants to find any two distinct nodes , such that  is maximum possible. Can you help him?

Interaction

Begin the interaction from reading a single integer  () — the number of nodes in the tree.

Next, read  lines.

The -th of the next  lines contains two integers  and  (), which means that there's an edge between nodes  and 

It's guaranteed that weights of edges were .

It is guaranteed that the given graph is a tree.

Now you may begin asking queries. To ask a query about a set of k nodes (, all  are distinct), output:

?     

You will then receive an integer , the largest  over  with 

When you have found  and  ()) such that  is the maximum possible, print the answer in the following format:

!  

Outputting answer doesn't count towards the limit of  queries.

If there are several pairs  with the same largest , you can output any.

After printing a query do not forget to output the end of line and flush the output. Otherwise, you will get Idleness limit exceeded. To do this, use:

  • fflush(stdout) or cout.flush() in C++;
  • System.out.flush() in Java;
  • flush(output) in Pascal;
  • stdout.flush() in Python;
  • see the documentation for other languages.


Example
input
Copy
6
1 2
2 3
2 4
1 5
5 6

10

2

10
output
Copy
? 6 1 2 3 4 5 6

? 3 3 1 5

? 2 1 2

! 1 2
Note

The tree in the first sample:

Codeforces Round 746 Div 2 Editorial

Program Code

#include<bits/stdc++.h>

using namespace std;

#define task "sol"
#define lb lower_bound
#define ub upper_bound
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define zs(v) ((int)(v).size())
#define BIT(x, i) (((x) >> (i)) & 1)
#define CNTBIT __builtin_popcountll
#define ALL(v) (v).begin(),(v).end()
//#define endl '\n'

typedef long double ld;
typedef long long ll;
typedef pair<int, int> pii;

const int dx[4]={-1, 0, 1, 0}, dy[4]={0, 1, 0, -1};
const int dxx[8]={-1, -1, 0, 1, 1, 1, 0, -1}, dyy[8]={0, 1, 1, 1, 0, -1, -1, -1};
const ll mod = 1000000007; /// 998244353
const ll base = 331;
const int N=3005;

pii e[N];
int n;
int cnt=0;
int numE;
vector<int> dsk[N];

int query(vector<int> &res)
{
    cnt++;
    assert(cnt<=12);
    cout<<"? "<<zs(res)<<' ';
    for (int i:res) cout<<i<<' ';
    cout<<endl;
    int x;
    cin>>x;
    return x;
}
int query(int l, int r)
{
    assert(l<=r);
    vector<int> res;
    for (int i=l;i<=r;++i)
    {
        res.pb(e[i].fi);
        res.pb(e[i].se);
    }
    sort(ALL(res));
    res.resize(unique(ALL(res))-res.begin());
    return query(res);
}
void dnc(int l, int r, int ans)
{
    int mid=(l+r)>>1;
    if (l<=0||r>n-1||l>r) return;
    if (l==r)
    {
        if (cnt<12) assert(ans==query(l,l));
        cout<<"! "<<e[l].fi<<' '<<e[l].se<<endl;
        exit(0);
    }
    int res=query(l,mid);

    if (res==ans)
    {
        dnc(l,mid,ans);
    }
    else
    {
        dnc(mid+1,r,ans);
    }
    assert(1==0);
}
void dfs(int u, int pre)
{
    for (int v:dsk[u]) if (v!=pre)
    {
        e[++numE]=mp(u,v);
        dfs(v,u);
    }
}
void solve()
{
    cin>>n;
    for (int i=1;i<=n-1;++i)
    {
        int u,v;
        cin>>u>>v;
        dsk[u].pb(v);
        dsk[v].pb(u);
    }
    dfs(1,1);
    vector<int> vec;
    for (int i=1;i<=n;++i) vec.pb(i);
    int ans=query(vec);
    dnc(1,n-1,ans);
}
int main()
{
    ios_base::sync_with_stdio(0); cin.tie(0);
    solve();
}



Links


More about Codeforces Round 746 Div 2

Codeforces organizes many contests out of which one is this Codeforces rounds to improve coding skills and get a higher coding knowledge. Codeforces Round 746 Div 2 was too a great round to test our coding skills. This round was held on  Sunday, October 3, 2021 at 20:05UTC+5.5. This round will be rated for coders with rating upto 2100. A total of 6 problems are given which needs to be solved in 2 hours 15 minutes.  

The first problem that is Gamer Hermose was cakewalk it was so simple that in 5 minutes we had more that four thousand successful submissions. Problem B was too a great deal of simplicity but it took a bit of time to understand what to do in the problem. Problem C was medium level and was a good question of logic for the average coders and for best coders it was just too simple. Problem D was good to go but the question was quite difficult to guess what algorithm would be required. Problem E1 was quite simple and many successful submissions were made. Problem E2 and F were the testing the skills of top coders and average coders just kept guessing what algorithms to use.

The contest was a great success and every body enjoyed it truly. Just practice more questions and go ahead in building a streak of code and get better everyday. Happy coding journey ahead. 

Comments

Popular posts from this blog

Snake Procession CodeChef SnackDown 2021 Beginner Practice Contest

 Snake Procession CodeChef SnackDown 2021 Beginner Practice Contest Question: The annual snake festival is upon us, and all the snakes of the kingdom have gathered to participate in the procession. Chef has been tasked with reporting on the procession, and for this he decides to first keep track of all the snakes. When he sees a snake first, it'll be its Head, and hence he will mark a 'H'. The snakes are long, and when he sees the snake finally slither away, he'll mark a 'T' to denote its tail. In the time in between, when the snake is moving past him, or the time between one snake and the next snake, he marks with '.'s. Because the snakes come in a procession, and one by one, a valid report would be something like "..H..T…HTH….T.", or "…", or "HT", whereas "T…H..H.T", "H..T..H", "H..H..T..T" would be invalid reports (See explanations at the bottom). Formally, a snake is represented by a 'H&

Qualifying to Pre-Elimination CodeChef SnackDown 2021 Beginner Practice Contest

 Qualifying to Pre-Elimination  CodeChef SnackDown 2021 Beginner Practice Contest Question: Snackdown 2019 is coming! There are two rounds (round A and round B) after the qualification round. From both of them, teams can qualify to the pre-elimination round. According to the rules, in each of these two rounds, teams are sorted in descending order by their score and each team with a score greater or equal to the score of the team at the  K = 1500 K = 1500 -th place advances to the pre-elimination round (this means it is possible to have more than  K K  qualified teams from each round in the case of one or more ties after the  K K -th place). Today, the organizers ask you to count the number of teams which would qualify for the pre-elimination round from round A for a given value of  K K  (possibly different from  1500 1500 ). They provided the scores of all teams to you; you should ensure that all teams scoring at least as many points as the  K K -th team qualify. Input: The first line

Chef and Typing CodeChef SnackDown 2021 Beginner Practice Contest

 Chef and Typing CodeChef SnackDown 2021 Beginner Practice Contest Question: Chef is practising his typing skills since his current typing speed is very low. He uses a training application that displays some words one by one for Chef to type. When typing a word, Chef takes 0.2 seconds to type the first character; for each other character of this word, he takes 0.2 seconds to type this character if it is written with a different hand than the previous character, or 0.4 seconds if it is written with the same hand. The time taken to type a word is the sum of times taken to type all of its characters. However, if a word has already appeared during practice, Chef can type it in half the time it took him to type this word for the first time. Currently, Chef is practising in easy mode, which only uses words that consists of characters 'd', 'f', 'j' and 'k'. The characters 'd' and 'f' are written using the left hand, while the characters 'j&#

Kitchen Timetable CodeChef SnackDown 2021 Beginner Practice Contest Solution

 Kitchen Timetable CodeChef SnackDown 2021 Beginner Practice Contest Solution Question: There are  N  students living in the dormitory of Berland State University. Each of them sometimes wants to use the kitchen, so the head of the dormitory came up with a timetable for kitchen's usage in order to avoid the conflicts: The first student starts to use the kitchen at the time  0  and should finish the cooking not later than at the time  A 1 . The second student starts to use the kitchen at the time  A 1  and should finish the cooking not later than at the time  A 2 . And so on. The  N -th student starts to use the kitchen at the time  A N-1  and should finish the cooking not later than at the time  A N The holidays in Berland are approaching, so today each of these  N  students wants to cook some pancakes. The  i -th student needs  B i  units of time to cook. The students have understood that probably not all of them will be able to cook everything they want. How many students will be

Chef and Operations CodeChef SnackDown 2021 Beginner Practice Contest

Chef and Operations CodeChef SnackDown 2021 Beginner Practice Contest Question: Chef has two sequences  A A  and  B B , each with length  N N . He can apply the following magic operation an arbitrary number of times (including zero): choose an index  i i  ( 1 ≤ i ≤ N − 2 1 ≤ i ≤ N − 2 ) and add  1 1  to  A i A i ,  2 2  to  A i + 1 A i + 1  and  3 3  to  A i + 2 A i + 2 , i.e. change  A i A i  to  A i + 1 A i + 1 ,  A i + 1 A i + 1  to  A i + 1 + 2 A i + 1 + 2  and  A i + 2 A i + 2  to  A i + 2 + 3 A i + 2 + 3 . Chef asks you to tell him if it is possible to obtain sequence  B B  from sequence  A A  this way. Help him! Input: The first line of the input contains a single integer  T  denoting the number of test cases. The description of  T  test cases follows. The first line of each test case contains a single integer  N . The second line contains  N  space-separated integers  A 1 , A 2 , … , A N . The third line contains  N  space-separated integers  B 1 , B 2 , … , B B 1 , B 2 , … , B

Round Robin Ranks CodeChef SnackDown 2021 Round 1A

 Round Robin Ranks CodeChef SnackDown 2021 Round 1A Question A round-robin tournament is being held in Chefland among N teams numbered 1,2,...,N. Every team play with all other teams exactly once. All games have only two possible results - win or loss. A win yields 2 points to the winning team while a loss yields no points. What is the maximum number of points a team finishing at the Kth position can score? Note: If two teams have the same points then the team with the higher team number achieves the better rank. Input Format First line will contain T, number of testcases. Then the testcases follow. Each testcase contains a single line of input, two space-separated integers N,K. Output Format For each testcase, output in a single line an integer - the maximum points the team ranked K in the round-robin tournament can score. Constraints 1≤T≤10^5 1≤K≤N≤10^9 Sample Input 1  3 3 3 4 1 7 4 Sample Output 1  2 6 8 Explanation Test Case 1: There are 3 teams in the tournament. The maximum score

Temple Land CodeChef SnacKDown 2021 Beginner Practice Contest

 Temple Land CodeChef SnacKDown 2021 Beginner Practice Contest Question: The snakes want to build a temple for Lord Cobra. There are multiple strips of land that they are looking at, but not all of them are suitable. They need the strip of land to resemble a coiled Cobra. You need to find out which strips do so. Formally, every strip of land, has a length. Suppose the length of the i-th strip is is  N i , then there will be  N i  integers,  H i1 , H i2 , .. H iN i , which represent the heights of the ground at various parts of the strip, in sequential order. That is, the strip has been divided into  N i  parts and the height of each part is given. This strip is valid, if and only if all these conditions are satisfied: There should be an unique 'centre' part. This is where the actual temple will be built. By centre, we mean that there should be an equal number of parts to the left of this part, and to the right of this part. H i1  = 1 The heights keep increasing by exactly 1, as

Delete Two Elements Educational Codeforces Round 115 Solution

 Delete Two Elements Educational Codeforces Round 115 Solution Introduction Educational Codeforces rounds are organized by Codeforces for the Division 2 Coders. Similarly Educational Codeforces Round was held on     Sunday, October 10, 2021 at 14:35 UTC+5.5   Series of Educational Rounds continue to be held as Harbour Space University initiative. This round will be rated for coders with rating upto 2100. It will be held on extended ICPC rules. The penalty for each incorrect submission until the full correct solution is 10 minutes. After the end of the contest you will have 12 hours to hack any solution. You will be given 7 problems and two hours to solve them.  The contest was a success and lots of submissions were made by the hard striving coders. Problem A that is the Computer Game was very easy and had the maximum number of successful submission. Problem B was a not easy but not difficult also it was fit for an average coder to solve. Problem C although was quite confusing at the st

Dance Moves CodeChef SnackDown 2021 Round 1A Solution

 Dance Moves CodeChef SnackDown 2021 Round 1A Solution Question This year Chef is participating in a Dancing competition. The dance performance will be done on a linear stage marked with integral positions. Initially, Chef is present at position X and Chef's dance partner is at position Y. Chef can perform two kinds of dance moves. If Chef is currently at position k, Chef can: Moonwalk to position k+2, or Slide to position k−1 Chef wants to find the minimum number of moves required to reach his partner. Can you help him find this number? Input Format First line will contain a single integer T, the number of testcases. Then the description of T testcases follows. Each testcase contains a single line with two space-separated integers X,Y, representing the initial positions of Chef and his dance partner, respectively. Output Format For each testcase, print in a separate line, a single integer, the minimum number of moves required by Chef to reach his dance partner. Constraints 1≤T≤10^

Unique Email Addresses LeetCode Solution

Unique Email Addresses LeetCode Solution   Question Every  valid email  consists of a  local name  and a  domain name , separated by the  '@'  sign. Besides lowercase letters, the email may contain one or more  '.'  or  '+' . For example, in  "alice@leetcode.com" ,  "alice"  is the  local name , and  "leetcode.com"  is the  domain name . If you add periods  '.'  between some characters in the  local name  part of an email address, mail sent there will be forwarded to the same address without dots in the local name. Note that this rule  does not apply  to  domain names . For example,  "alice.z@leetcode.com"  and  "alicez@leetcode.com"  forward to the same email address. If you add a plus  '+'  in the  local name , everything after the first plus sign  will be ignored . This allows certain emails to be filtered. Note that this rule  does not apply  to  domain names . For example,  "m.y+name@ema