MNM algo
Once upon a time, three Syrian competitive programmers decided to spend their time in doing research and studies. they worked hard. Finally, hard work paid off and they discovered the algorithm -which Codeforces uses to catch cheaters [the ones who violate Codeforces contest rules]. Their lives have just become easier and now they can copy codes from each other / Ideone without spending time changing variables names and methods declarations order.
Those three inventors are EleCursity, NourAlhadi, SubSpring. (hats off people ...).
MNM -(first letters of EleCursity, NourAlhadi, SubSpring respectively)- Cheating Algorithm is -in my opinion, the greatest since the invention of breadth/depth-first search algorithms.
MNM is simple, here is a simple explanation for it:
- MNM relies on "divide and conquer" approach in solving div2 contest- problems. Problems are divided amongst EleCursity, NourAlhadi, SubSpring.
- MNM uses multithreading among M-N-M brains to solve the problems and urges those M-N-M to share the solutions in a Facebook chat, so all three participants submit their solutions with a simple addition.
- if N NourAlhadi solves problem X then he submits it without header additions M SubSpring adds header1. M EleCursity adds header2.
elif M SubSpring solves the problem, he submits it without additions. N NourAlhadi adds header1. M EleCursity adds header2.
elif M EleCursity solves the problem, he submits it without additions. N NourAlhadi adds header1. M SubSpring adds header2.
Submit the new codes immediately and avoid cheat detection.
Latest achievement:
Problem A EleCursity 35623761 NourAlhadi 35622851 same code with header2. SubSpring 35623758 same code.
Problem B All failed with the same solution,
Header2 is used by EleCursity, Header1 is used by SubSpring, problem solver/ failed solver NourAlhadi
Problem C Problem solver EleCursity, header1 user SubSpring, header2 user NourAlhadi.
Problem D CheatersHunter is bored from writing but you got the Idea.
Header1
#include <bits/stdc++.h>
#define PB push_back
#define MP make_pair
#define X first
#define Y second
#define SCD(a) scanf("%d",&a)
#define SCD2(a,b) scanf("%d %d",&a,&b)
#define SCLL(a) scanf("%lld",&a)
#define SCLL2(a,b) scanf("%lld %lld",&a,&b)
#define PRD(a) printf("%d\n",a)
#define PRLL(a) printf("%lld\n",a)
#define speed ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define sz(v) ((int)v.size())
#define all(v) v.begin(),v.end()
#define endl "\n"
#define MEMO memset(memo,-1,sizeof memo)
#define SP setprecision
#define hafo GodessOfHope
#define TEST int test; cin>>test; for (int Test=1;Test<=test;Test++)
using namespace std;
void files (bool in,char *s){ if (in) freopen(s,"r",stdin); else freopen(s,"w",stdout);}
const double PI = 4 * atan(1.0);
const double EPS = 1e-9;
const int infi = (int)1e9;
const long long infl = (long long)1e17;
const int MOD = (int) 1e9+7;
const int MAX = (int) 1e6+22;
const int dx[] = {0,1,-1,0,0,1,1,-1,-1};
const int dy[] = {0,0,0,-1,1,1,-1,1,-1};
const int kdx[] ={1,1,-1,-1,2,2,-2,-2};
const int kdy[] ={2,-2,2,-2,1,-1,1,-1};
Header2 is
#include <bits/stdc++.h>
#define PB push_back
#define MP make_pair
#define X first
#define Y second
#define SCD(a) scanf("%d",&a)
#define SCD2(a,b) scanf("%d %d",&a,&b)
#define SCLL(a) scanf("%lld",&a)
#define SCLL2(a,b) scanf("%lld %lld",&a,&b)
#define PRD(a) printf("%d\n",a)
#define PRLL(a) printf("%lld\n",a)
#define speed ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define sz(v) ((int)v.size())
#define all(v) v.begin(),v.end()
#define endl "\n"
#define MEMO memset(memo,-1,sizeof memo)
#define SP setprecision
#define hafo GodessOfHope
#define TEST int test; cin>>test; for (int Test=1;Test<=test;Test++)
using namespace std;
void files (bool in,char *s){ if (in) freopen(s,"r",stdin); else freopen(s,"w",stdout);}
const double PI = 4 * atan(1.0);
const double EPS = 1e-9;
const int infi = (int)1e9;
const long long infl = (long long)1e17;
const int MOD = (int) 1e9+7;
const int MAX = (int) 1e6+22;
const int dx[] = {0,1,-1,0,0,1,1,-1,-1};
const int dy[] = {0,0,0,-1,1,1,-1,1,-1};
const int kdx[] ={1,1,-1,-1,2,2,-2,-2};
const int kdy[] ={2,-2,2,-2,1,-1,1,-1};
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef vector <int> vi;
typedef vector <ll> vll;
typedef vector <vi> vvi;
typedef vector <vll> vvll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef vector<pii> vpii;
typedef vector<pll> vpll;