#include #define MAX(a,b) (((a)>(b))?(a):(b)) #define MIN(a,b) (((a)>(b))?(b):(a)) #define ABS(x) ((x>0)?(x):(-(x))) #define ulli unsigned long long int #define lli long long int #define pb push_back #define mp make_pair #define fi first #define se second #define all(x) x.begin(),x.end() #define rall(x) x.rbegin(),x.rend() #define vi vector #define pii pair #define matrix vector > #define rep(lo,hi) for(lli i=lo;i0)return b*powerf(b*b,e/2); else return powerf(b*b,e/2)/b;}} lli modpow(lli b,lli e,lli m) { lli r=1; b=b%m; while(e>0) { if(e%2==1) r=(r*b)%m; e/=2; b=(b*b)%m; } return r; } lli modinverse(lli a,lli mod) { return modpow(a,mod-2,mod); } lli modinverse2(lli a,lli m) { lli x,y; exgcd(a,m,x,y); while(x<0) x+=m; return x; } lli nCrmod(lli n,lli r,lli m) {if(r>n) r=n-r; lli res=1; for(lli i=r;i>=1;i--) { res=(res*(n-i+1))%m; res=(res*modinverse(i,m)); } return res; } lli nCr(lli n,lli r) {if(r>n) r=n-r; lli res=1; for(lli i=r;i>=1;i--) { res*=(n-i+1); res/=i; } return res; } lli totient(lli n) { lli res=n,p; for(p=2;p*p<=n;p++){ if(n%p==0){ while(n%p==0) n/=p; res-=res/p; }} if(n>1) res-=res/n; return res; } bool isprime(lli x) { if(x==1) return false; for(lli i=2;i*i<=x;i++) if(x%i==0) return false; return true; } bool isvowel(char c) { if(isupper(c)) c=tolower(c); return c=='a'||c=='e'||c=='i'||c=='o'||c=='u'; } bool istriangle(lli a,lli b,lli c) { return (a+b>c)&&(a+c>b)&&(b+c>a); } lli stringmod(string s,lli mod) { lli res=0; for(unsigned int i=0;i=pw) { res+=(n/pw); pw*=p; } return res; } matrix matrixmultiply(matrix A,matrix B,lli n) { matrix C(2,vector(n)); for(int i=0;i(n)); for(int i=0;i>t; for(lli c=1;c<=t;c++) { cout<<"Case #"<>n>>c; if(2*c>n*(n-1)||c>tt; while(tt--) { judge(); //gcj(); } return 0; }