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
#include<iostream> | |
#include<cstdio> | |
#include<cstring> | |
using namespace std; | |
#define NN 11000 | |
#define int long long | |
int tp,prime[NN],pre[NN],x,y,d; | |
const int mod=9901; |
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
#include<iostream> | |
#include<cstdio> | |
#include<cstring> | |
using namespace std; | |
typedef long long LL; | |
LL n,r,k; | |
LL ansk,ansr,Max; |
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
#include<iostream> | |
#include<cstdio> | |
#include<cstring> | |
using namespace std; | |
#define NN 2100 | |
int xl,yl,xr,yr,root,totnode,n,q,i,pos,dep,tmp1,tmp2,ans,son[NN]; | |
struct node{ | |
int l,r; |
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
#include<iostream> | |
#include<cstdio> | |
#include<cstring> | |
using namespace std; | |
int n,m,k,totpri,totfac,f[2][40][1010]; | |
int pas,now,i,j,r,l,tp,newsta; | |
int svpri[10],mulpri[10],fac[100],svsta[100]; |
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
#include<iostream> | |
#include<cstring> | |
#include<cstdio> | |
#include<algorithm> | |
using namespace std; | |
#define NN 201000 | |
struct Edge{int a,b,c;}edge[NN]; |
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
#include<iostream> | |
#include<cstdio> | |
#include<cstring> | |
using namespace std; | |
#define NN 1110 | |
#define MM 11100000 | |
int n,i,j,b[NN][NN],flag,bit; | |
int first[NN],next[MM],v[MM],tote; |
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
#include<iostream> | |
#include<cstdio> | |
#include<cstring> | |
#include<algorithm> | |
using namespace std; | |
#define NN 101000 | |
int n,m,i,ord[NN],b[NN],totn,tott,root[NN],a,bb,c; | |
struct segtree{ |