#include<cstdlib>
#include<cstdio>
#include<algorithm>
using namespace std;
const int N=301;
const int M=100001;
const int K=4;
int a;
int f;
int n,m,i,j,k,x,y,t,u,v;
void make(int &k,int w,int x,int y,int...
#include <bits/stdc++.h>
#define ll long long
using namespace std;
ll n,t,k,i,m,q,f;
ll a,s,w,p,res;
map <int,int> mapp;
ll cal(ll a,ll b,ll c) {
if (c==0)...