![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
杭电
关迪迪屁事.
相遇即是上上签.
展开
-
HDU-1050 Moving Tables
标题HDU-1050 Moving Tables开始的时候直接当成求线段重叠条数的题,发现这种思路完全是错的比如 1 - 3,2 - 4,3 - 5 这一组,只需搬动两次即可,但找重叠线段的话就会找到 3 条重叠线段。还有一个坑点在于走廊两侧都有房间也就是说room1和room2对应的位置是一样的1 to 3 4to6 是没法同时完成的 所以要计算成楼道号进行运算计算重叠度注意可能存在从后往前与从前往后两种情况 统一成一种情况进行计算#include <bits/stdc++.h>原创 2021-04-12 20:34:33 · 82 阅读 · 0 评论 -
HDU-2037 今年暑假不AC
HDU-2037 今年暑假不AC#include <bits/stdc++.h>using namespace std;#define max 100struct jiemu { int ks,js;};jiemu a[max];int main(){ int n; while (scanf("%d",&n)==1){ if (n==0) return 0; int i; for (i=1;i<=n;i++){ scanf("%d %d",&am原创 2021-04-11 15:33:44 · 106 阅读 · 0 评论 -
HDU-1236 排名
排名 添加链接描述#include <stdio.h>#include <string.h>typedef struct{ char number[21]; int slovem; int sum;}stu;int main(){ int n; while (~scanf("%d", &n) && n){ int m, line, point[10]; int i, j, t, cont = 0; stu s[n]; sc原创 2021-04-08 20:58:39 · 67 阅读 · 0 评论 -
HDU-1052 Tian Ji -- The Horse Racing
Tian Ji – The Horse Racing添加链接描述#include<cstdio>#include<cstring>#include<iostream>#include<cmath>#include<algorithm>using namespace std;bool cmp(int a,int b){ return a>b;}int main(){ int n,i; int a[1000],b原创 2021-04-06 20:36:40 · 71 阅读 · 0 评论 -
HDU-1009 FatMouse‘ Trade
FatMouse’ Trade添加链接描述#include <stdio.h>#include<iostream>#include<string.h>#include<algorithm>const int maxn=1005;using namespace std;struct shuzu{ double a,b,c;}; bool cmp(shuzu x,shuzu y){ if (x.c>=y.c) retur原创 2021-04-06 20:09:02 · 63 阅读 · 0 评论 -
HDU-1000 A + B Problem
A + B Problem 添加链接描述#include <stdio.h>int main(){int a,b;while(scanf("%d %d",&a,&b)==2){ printf("%d\n",a+b); } return 0;}原创 2021-03-30 20:54:17 · 52 阅读 · 0 评论 -
HDU-1098 Ignatius‘s puzzle
Ignatius’s puzzle#include <stdio.h>int main(){ int k,a,i; while (scanf("%d",&k)==1){ for (i=0;i<=64;i++){ if((18+k*i)%65==0){ printf("%d\n",i); break; } }原创 2021-03-30 19:17:19 · 67 阅读 · 0 评论 -
HDU-1097 A hard puzzle
A hard puzzle添加链接描述#include <stdio.h>int main() { int a, b, d, i; while (scanf("%d%d", &a, &b)==2) { a %= 10000; b %= 10000; d = 1; for (i = 1; i <= b; i++) { d *= a; d %= 1原创 2021-03-30 19:04:17 · 59 阅读 · 0 评论 -
HDU-1021 Fibonacci Again
Fibonacci Again添加链接描述#include<stdio.h>int main() { int n; while (scanf("%d", &n)==1) if ((n - 2) % 4 == 0) printf("yes\n"); else printf("no\n"); return 0;}找规律原创 2021-03-30 19:01:35 · 55 阅读 · 0 评论 -
HDU-1019 Least Common Multiple
Least Common Multiple添加链接描述#include <stdio.h>int gcd(int a,int b);int main(){ int n; scanf("%d",&n); int i; int n1,j,x,y; for (i=1;i<=n;i++){ scanf("%d %d",&n1,&x); for (j=1;j<n1;j++){原创 2021-03-30 18:58:56 · 77 阅读 · 0 评论 -
HUD-1108 最小公倍数
最小公倍数添加链接描述#include <stdio.h>int main(){ int a,b,c; while (scanf("%d",&a)==1){ scanf("%d",&b); c=a; while (a%b!=0){ a=a+c; } printf("%d\n",a); } return 0; }原创 2021-03-30 18:56:48 · 71 阅读 · 0 评论 -
HDU-1001 Sum Problem
Sum Problem添加链接描述#include<stdio.h>int main(){ int n; while(scanf("%d",&n) == 1) { int sum=0; for(int i=1;i<=n;i++) { sum+=i; } printf("%d\n\n",sum); } return 0;}...原创 2021-03-30 18:53:23 · 59 阅读 · 0 评论