![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
作业
zig-zag
这个作者很懒,什么都没留下…
展开
-
hdu5685
#include<bits/stdc++.h>using namespace std;int MOD=9973;string s;int sum[100050];int quick_pow_mod(int a,int n){ int ans=1; int base=a; while(n!=0){ if(n%2){ ans=(ans*base)%MOD; } base=(base*base).原创 2021-07-12 15:17:26 · 97 阅读 · 0 评论 -
hdu1421
#include<bits/stdc++.h>#define LL long long#define GG long long#define For(i, j, k) for(int i=j; i<=k; i++)#define Dow(i, j, k) for(int i=j; i>=k; i--)using namespace std;inline GG read() { GG x = 0, f = 1; char ch = getchar(); .原创 2021-05-26 21:03:23 · 83 阅读 · 0 评论 -
hdu1087
#include<bits/stdc++.h>#define LL long long#define GG long long#define For(i, j, k) for(int i=j; i<=k; i++)#define Dow(i, j, k) for(int i=j; i>=k; i--)using namespace std;inline GG read() { GG x = 0, f = 1; char ch = getchar(); .原创 2021-05-26 20:19:47 · 75 阅读 · 0 评论 -
hdu1257
#include<bits/stdc++.h>#define LL long long#define GG long long#define For(i, j, k) for(int i=j; i<=k; i++)#define Dow(i, j, k) for(int i=j; i>=k; i--)using namespace std;inline GG read() { GG x = 0, f = 1; char ch = getchar(); .原创 2021-05-26 20:15:27 · 68 阅读 · 0 评论 -
hdu1160
#include<iostream>#include<stdio.h>#include<algorithm>using namespace std;int b[1001];int a[1001];int c[1001];struct node{ int w; int v; int sign;} s[1001];int cmp(node x, node y){ if(x.w==y.w) return .原创 2021-05-26 20:02:10 · 55 阅读 · 0 评论 -
hdu2084
#include<bits/stdc++.h>#define LL long long#define GG long long#define For(i, j, k) for(int i=j; i<=k; i++)#define Dow(i, j, k) for(int i=j; i>=k; i--)using namespace std;inline GG read() { GG x = 0, f = 1; char ch = getchar(); .原创 2021-05-20 20:40:26 · 55 阅读 · 0 评论 -
hdu1058
#include<bits/stdc++.h>#define LL long long#define GG long long#define For(i, j, k) for(int i=j; i<=k; i++)#define Dow(i, j, k) for(int i=j; i>=k; i--)using namespace std;inline GG read() { GG x = 0, f = 1; char ch = getchar(); .原创 2021-05-20 20:11:14 · 60 阅读 · 0 评论 -
pta2050
#include<bits/stdc++.h>#include<iostream> #define LL long long#define GG int #define For(i, j, k) for(int i=j; i<=k; i++)#define Dow(i, j, k) for(int i=j; i>=k; i--)inline GG read() { GG x = 0, f = 1; char ch = getchar();.原创 2021-05-16 20:30:04 · 75 阅读 · 0 评论 -
洛谷P1044
#include<bits/stdc++.h>#include<iostream> #define LL long long#define GG int #define For(i, j, k) for(int i=j; i<=k; i++)#define Dow(i, j, k) for(int i=j; i>=k; i--)inline GG read() { GG x = 0, f = 1; char ch = getchar();.原创 2021-05-16 19:10:44 · 76 阅读 · 0 评论 -
hdu2067
#include<bits/stdc++.h>#include<iostream> #define LL long long#define GG int #define For(i, j, k) for(int i=j; i<=k; i++)#define Dow(i, j, k) for(int i=j; i>=k; i--)inline GG read() { GG x = 0, f = 1; char ch = getchar();.原创 2021-05-16 19:08:06 · 58 阅读 · 0 评论 -
hdu2045
#include<bits/stdc++.h>#include<iostream> #define LL long long#define GG int #define For(i, j, k) for(int i=j; i<=k; i++)#define Dow(i, j, k) for(int i=j; i>=k; i--)inline GG read() { GG x = 0, f = 1; char ch = getchar();.原创 2021-05-16 18:51:53 · 51 阅读 · 0 评论 -
hdu2047
#include<bits/stdc++.h>#include<iostream> #define LL long long#define GG int #define For(i, j, k) for(int i=j; i<=k; i++)#define Dow(i, j, k) for(int i=j; i>=k; i--)inline GG read() { GG x = 0, f = 1; char ch = getchar();.原创 2021-05-16 15:31:29 · 74 阅读 · 0 评论 -
hdu2044
#include<bits/stdc++.h>#include<iostream> #define LL long long#define GG int #define For(i, j, k) for(int i=j; i<=k; i++)#define Dow(i, j, k) for(int i=j; i>=k; i--)inline GG read() { GG x = 0, f = 1; char ch = getchar();.原创 2021-05-16 15:12:07 · 54 阅读 · 0 评论 -
hdu2041
#include<bits/stdc++.h>#include<iostream> #define LL long long#define GG int #define For(i, j, k) for(int i=j; i<=k; i++)#define Dow(i, j, k) for(int i=j; i>=k; i--)inline GG read() { GG x = 0, f = 1; char ch = getchar();.原创 2021-05-16 15:09:15 · 64 阅读 · 0 评论 -
hdu2501
#include<bits/stdc++.h>#include<iostream> #define LL long long#define GG int #define For(i, j, k) for(int i=j; i<=k; i++)#define Dow(i, j, k) for(int i=j; i>=k; i--)inline GG read() { GG x = 0, f = 1; char ch = getchar();.原创 2021-05-16 14:55:19 · 100 阅读 · 0 评论 -
hdu2190
#include<bits/stdc++.h>#include<iostream> #define LL long long#define GG int #define For(i, j, k) for(int i=j; i<=k; i++)#define Dow(i, j, k) for(int i=j; i>=k; i--)inline GG read() { GG x = 0, f = 1; char ch = getchar();.原创 2021-05-16 14:40:52 · 68 阅读 · 0 评论 -
hdu2046
#include<bits/stdc++.h>#include<iostream> #define LL long long#define GG int #define For(i, j, k) for(int i=j; i<=k; i++)#define Dow(i, j, k) for(int i=j; i>=k; i--)inline GG read() { GG x = 0, f = 1; char ch = getchar();.原创 2021-05-16 14:21:26 · 44 阅读 · 0 评论 -
hdu1272
#include<iostream>using namespace std;#define MAX 100005int father[MAX],flag,sign[MAX];int FindSet(int x){ while(x!=father[x]) x=father[x]; return x; } void Union(int x,int y) { x=FindSet(x); y=FindSet(y); .原创 2021-05-13 19:33:28 · 48 阅读 · 0 评论 -
hdu1879
#include<iostream>#include <stdio.h> #include <math.h>#include <string.h>#include <algorithm>#define LL long long#define GG int #define For(i, j, k) for(int i=j; i<=k; i++)#define Dow(i, j, k) for(int i=j; i>=k;.原创 2021-05-12 20:25:27 · 53 阅读 · 0 评论 -
pta1233还是畅通工程
#include<iostream>#include <stdio.h> #include <math.h>#include <string.h>#include <algorithm>#define LL long long#define GG int #define For(i, j, k) for(int i=j; i<=k; i++)#define Dow(i, j, k) for(int i=j; i>=k;.原创 2021-05-12 20:07:45 · 55 阅读 · 0 评论 -
天梯赛训练3 L1-5 胎压监测
让我们把四个车轮 —— 左前轮、右前轮、右后轮、左后轮 —— 顺次编号为 1、2、3、4。本题就请你编写一个监测程序,随时监测四轮的胎压,并给出正确的报警信息。报警规则如下:如果所有轮胎的压力值与它们中的最大值误差在一个给定阈值内,并且都不低于系统设定的最低报警胎压,则说明情况正常,不报警; 如果存在一个轮胎的压力值与它们中的最大值误差超过了阈值,或者低于系统设定的最低报警胎压,则不仅要报警,而且要给出可能漏气的轮胎的准确位置; 如果存在两个或两个以上轮胎的压力值与它们中的最大值误差超过了阈值,或.原创 2021-04-22 20:45:07 · 188 阅读 · 0 评论 -
天梯赛训练3 L2-3 完全二叉树的层序遍历
一个二叉树,如果每一个层的结点数都达到最大值,则这个二叉树就是完美二叉树。对于深度为D的,有N个结点的二叉树,若其结点对应于相同深度完美二叉树的层序遍历的前N个结点,这样的树就是完全二叉树。给定一棵完全二叉树的后序遍历,请你给出这棵树的层序遍历结果。输入格式:输入在第一行中给出正整数N(≤30),即树中结点个数。第二行给出后序遍历序列,为N个不超过 100 的正整数。同一行中所有数字都以空格分隔。输出格式:在一行中输出该树的层序遍历序列。所有数字都以 1 个空格分隔,...原创 2021-04-22 20:38:32 · 81 阅读 · 0 评论 -
HDU1872
#include <iostream>#include<cstdio>#include<cstring>#include<algorithm>using namespace std;struct node{ int index; char name[55]; int grade;}num[400],tmp[400];int pos[400];bool cmp(node a,node b){ if(a.grade.原创 2021-04-14 18:23:50 · 67 阅读 · 0 评论 -
HDU1232
#include<iostream>#include <stdio.h> #include <math.h>#include <string.h>#include <algorithm>#define LL long long#define GG int #define For(i, j, k) for(int i=j; i<=k; i++)#define Dow(i, j, k) for(int i=j; i>=k;.原创 2021-04-11 18:37:48 · 38 阅读 · 0 评论 -
HDU-2093
#include<iostream>#include <stdio.h> #include <math.h>#include <string.h>#include <algorithm>#define LL long long#define GG int #define For(i, j, k) for(int i=j; i<=k; i++)#define Dow(i, j, k) for(int i=j; i>=k;.原创 2021-04-11 13:39:41 · 66 阅读 · 0 评论 -
HDU3183
#include<iostream>#include<cstdio>#include<cstring>#include<stack>using namespace std;const int maxn = 1010;stack<int> sta;int main(){ int ans[maxn]; string str; int k;int i; while(cin>>str>>.原创 2021-04-07 20:58:32 · 61 阅读 · 0 评论 -
HDU-2454
#include<bits/stdc++.h>using namespace std;#define MAX_N 1009int ds[MAX_N];int main(){ int t, n, p, flg; scanf("%d", &t); while(t--){ scanf("%d", &n); for(int i = 1; i <= n; i++) scanf("%d", ds+i); .原创 2021-04-07 20:36:36 · 51 阅读 · 0 评论 -
HDU-2037
#include <stdio.h> #include <math.h>#include <algorithm>#define LL long long#define GG int #define For(i, j, k) for(int i=j; i<=k; i++)#define Dow(i, j, k) for(int i=j; i>=k; i--)using namespace std;const int N = 1011; dou.原创 2021-04-03 14:06:43 · 77 阅读 · 0 评论 -
1050
#include <stdio.h> #include <math.h>#include <algorithm>#define LL long long#define GG int #define For(i, j, k) for(int i=j; i<=k; i++)#define Dow(i, j, k) for(int i=j; i>=k; i--)using namespace std;const int N = 1011; int.原创 2021-04-03 10:00:23 · 46 阅读 · 0 评论 -
HDU-1052
#include <stdio.h>#include <stdlib.h>#define max( a, b ) a > b ? a : bconst int maxn = 1005;int tj[maxn],king[maxn];int cmp ( const void *p1, const void *p2 ) { return *( int * )p1-*( int * )p2;}void print ( int a[], int n ) { .原创 2021-04-03 09:32:22 · 105 阅读 · 0 评论 -
HDU-1009
#include <stdio.h> #include <math.h>#include <algorithm>#define LL long long#define GG int #define For(i, j, k) for(int i=j; i<=k; i++)#define Dow(i, j, k) for(int i=j; i>=k; i--)using namespace std;const int N = 1011; str.原创 2021-04-02 19:52:19 · 67 阅读 · 0 评论 -
HDU-1098
#include <stdio.h> #include <math.h>#include <algorithm>#define LL long long#define GG int #define For(i, j, k) for(int i=j; i<=k; i++)#define Dow(i, j, k) for(int i=j; i>=k; i--)int GCD(int x, int y) { if(!y) return x; .原创 2021-03-30 19:12:48 · 45 阅读 · 0 评论 -
2899
#include <stdio.h> #include <math.h>#include <algorithm>#define LL long long#define GG int #define For(i, j, k) for(int i=j; i<=k; i++)#define Dow(i, j, k) for(int i=j; i>=k; i--)#define f(x) x*(x*(x*(x*8+7)+2)+3)+6-yusing .原创 2021-03-29 19:10:46 · 88 阅读 · 0 评论 -
1060
#include<bits/stdc++.h>#define LL long long#define GG long long#define For(i, j, k) for(int i=j; i<=k; i++)#define Dow(i, j, k) for(int i=j; i>=k; i--)using namespace std;int T, n; int main() { scanf("%d",&T); while(T--) {.原创 2021-03-29 18:52:53 · 35 阅读 · 0 评论 -
2035
#include<stdio.h> #include<math.h> #define LL long long#define GG int #define For(i, j, k) for(int i=j; i<=k; i++)#define Dow(i, j, k) for(int i=j; i>=k; i--)using namespace std;int T, n, x, y; int f[1000011]; int ksm(int x, in.原创 2021-03-28 15:06:15 · 45 阅读 · 0 评论 -
1097
#include<stdio.h> #include<math.h> #define LL long long#define GG int #define For(i, j, k) for(int i=j; i<=k; i++)#define Dow(i, j, k) for(int i=j; i>=k; i--)using namespace std;int T, n, x, y; int f[1000011]; int ksm(int x, in.原创 2021-03-28 15:00:33 · 58 阅读 · 0 评论 -
hdu1021
#include<stdio.h> #include<math.h> #define LL long long#define GG int #define For(i, j, k) for(int i=j; i<=k; i++)#define Dow(i, j, k) for(int i=j; i>=k; i--)using namespace std;int T, n, x, y; int f[1000011]; int main() { f[0.原创 2021-03-28 14:50:01 · 36 阅读 · 0 评论 -
1019
#include<stdio.h> #include<math.h> #define LL long long#define GG int #define For(i, j, k) for(int i=j; i<=k; i++)#define Dow(i, j, k) for(int i=j; i>=k; i--)using namespace std;int T, n, x, y; int gcd(int x, int y) { if(!y) ret.原创 2021-03-28 14:39:43 · 41 阅读 · 0 评论 -
hdu 1108
#include<stdio.h> #include<math.h> #define LL long long#define GG int #define For(i, j, k) for(int i=j; i<=k; i++)#define Dow(i, j, k) for(int i=j; i>=k; i--)using namespace std;int n, x, y; int gcd(int x, int y) { if(!y) return.原创 2021-03-28 14:28:05 · 40 阅读 · 0 评论 -
1093
#include<stdio.h> int a, b, n, T; int main() { scanf("%d", &T); while(T--) { scanf("%d", &n); b = 0; for(int i=1; i<=n; i++) { scanf("%d", &a); b += a; } printf("%d\n", b); } return 0; }原创 2021-03-21 14:55:57 · 48 阅读 · 0 评论