随笔分类 - POJ2
摘要:#include<iostream> #include<queue> #include<cstring> using namespace std; char data[25][25]; bool visit[25][25]; int r,c,a,b,result; struct Node{ int
阅读全文
摘要:/* 100 7 1 101 1 2 1 2 2 2 3 2 3 3 1 1 3 2 3 1 1 5 5 */ #include<iostream> using namespace std; #define maxn 50005 struct node{ int parent; int relati
阅读全文
摘要:#include<iostream> #include<algorithm> using namespace std; #define maxn 5005 int r,c,n; typedef struct node{ int x,y; }Point; Point point[maxn]; int
阅读全文
摘要:#include<iostream> #include<cstring> using namespace std; #define maxn 105 int t,w,h,wall_num; typedef struct node{ int x1,y1,x2,y2; }Wall; Wall wall[
阅读全文
摘要:#include<iostream> using namespace std; int n,k,data[10005]; bool check(int len){ int sum = 0; for(int i=0;i<n;i++){ sum += data[i]/len; } if(sum>=k)r
阅读全文
摘要:#include<iostream> #include<cstring> using namespace std; #define maxn 105 const int dx[] = {0,1,0,-1},dy[] = {1,0,-1,0}; int data[maxn][maxn],len[max
阅读全文
摘要:#include<iostream> using namespace std; long long pow(long long m,int n){ long long ans = 1; while(n--){ ans *= m; } return ans; } int main(){ int i,j
阅读全文
摘要:#include<iostream> #include<queue> //https://blog.csdn.net/lyy289065406/article/details/6647917 using namespace std; int m[530000]; int main(){ int i,
阅读全文
摘要:#include<iostream> using namespace std; int main(){ int t,k,i; long long n; char a[100],out[100]; scanf("%d",&t); while(t--){ scanf("%d%s%lld",&k,a,&n
阅读全文
摘要:#include<iostream> #include<cstring> #include<cmath> using namespace std; int main(){ char a[][10] = {"too low","right on","too high"}; int i,low[12],
阅读全文
摘要:#include<iostream> #include<cmath> #define PI 3.141592653589793 using namespace std; int main(){ double x[3],y[3]; double k[2][2],b[2][2],x0,y0,r; whi
阅读全文
摘要:#include<iostream> #include<cstring> using namespace std; int data[150],len; void multiply(int tmp){ int i,j; for(i=0;i<len;i++){ data[i] *= tmp; } fo
阅读全文
摘要:/* Sample Input 1 2 3 0 ; three different stamp types 7 4 0 ; two customers 1 1 0 ; a new set of stamps (two of the same type) 6 2 3 0 ; three custome
阅读全文
摘要:#include<iostream> #include<cstring> #include<cmath> #include<algorithm> using namespace std; #define maxn 1005 int inPair[maxn][2],width,total,cup; t
阅读全文
摘要:#include<iostream> #include<cstring> using namespace std; int main(){ char month[][10] = {"pop","no","zip","zotz","tzec", "xul","yoxkin","mol","chen",
阅读全文
摘要:#include<iostream> #include<cstring> #include<string> #include<algorithm> using namespace std; string data[105]; int data_num[105]; int nixushu(string
阅读全文
摘要:#include<iostream> /* 23,28,33 28*33=924 23*33=759 23*28=644 924*a%23=1,a=6,924*a=5544 759*a%28=1,a=19,759*a=14421 644*a%33=1,a=2,644*2=1288 */ using
阅读全文
摘要:#include<iostream> #include<cstring> #include<algorithm> #include<cctype> using namespace std; int data[100005]; int main(){ memset(data,0,sizeof(data
阅读全文
摘要:#include<iostream> #include<cmath> #include<cstring> using namespace std; int a[200],na,xiaoshu; void multiply(int b){ int i; for(i=0;i<na;i++){ a[i]
阅读全文