HDU 5391 水题。】的更多相关文章

E - 5 Time Limit:1500MS     Memory Limit:262144KB     64bit IO Format:%I64d & %I64u Submit Status Practice HDU 5391 Description Tina Town is a friendly place. People there care about each other. Tina has a ball called zball. Zball is magic. It grows…
N! Time Limit: 10000/5000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others) Total Submission(s): 64256    Accepted Submission(s): 18286 Problem Description Given an integer N(0 ≤ N ≤ 10000), your task is to calculate N!   Input One N in…
水题 /* * Author : ben */ #include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <ctime> #include <iostream> #include <algorithm> #include <queue> #include <set> #include <m…
1040水题; These days, I am thinking about a question, how can I get a problem as easy as A+B? It is fairly difficulty to do such a thing. Of course, I got it after many waking nights.Give you some integers, your task is to sort these number ascending (…
题意:判断一些数里有最大因子的数 水题,省赛即将临近,高效的代码风格需要养成,为了简化代码,以后可能会更多的使用宏定义,但是通常也只是快速拿下第一道水题,涨自信.大部分的代码还是普通的形式,实际上能简化的部分也不太多 #include<iostream> #include<cstring> #include<cmath> #include<cstdio> using namespace std; #define for0n for(i=0;i<n;i+…
/* 对于只会弗洛伊德的我,迪杰斯特拉有点不是很理解,后来发现这主要用于单源最短路,稍稍明白了点,不过还是很菜,这里只是用了邻接矩阵 套模板,对于邻接表暂时还,,,没做题,后续再更新.现将这题贴上,应该是迪杰斯特拉最水的题没有之一.纯模板 找到距离起点最近的点,以此点为中间点进行更新,找到了在进行下一个点. */ 题目大意: 搬东西很累,想省力,给你几个点和点之间的距离:标准题型: #include<stdio.h> #include <iostream> #include<…
题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=5162 题解:看了半天以为测试用例写错了.这题玩文字游戏.它问的是当前第i名是原数组中的第几个. #include<stdio.h> #include<iostream> #include<string.h> #include <stdlib.h> #include<math.h> #include<algorithm> #include…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3357 #include <cstdio> #include <cmath> #include <algorithm> #include <iostream> #include <cstring> #include <queue> #include <vector> #define maxn 250 #define maxe 1…
http://acm.hdu.edu.cn/showproblem.php?pid=5038 就是求个众数  这个范围小 所以一个数组存是否存在的状态即可了 可是这句话真恶心  If not all the value are the same but the frequencies of them are the same, there is no mode. 事实上应该是这个意思: 当频率最高的有多个的时候. 假设 全部的grade出现的频率都是相等的,那么是没有mode的 否则依照升序 当…
题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=5138 反着来. #include<iostream> #include<cstdio> #include<cstring> #include<algorithm> #include<cmath> #include <queue> using namespace std; int main() { ] = {,,,,}; int n; w…
#include<cstdio> #include<iostream> #include<algorithm> #include<cstring> #include<cmath> #include<queue> #include<map> using namespace std; #define MOD 1000000007 const int INF=0x3f3f3f3f; ; typedef long long ll;…
纯暴力就能过的,可是题目描述真心不清楚,我看了好久好久才明白题目啥意思. 为了迅速打完,代码比较冗余. /* * Author : ben */ #include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <ctime> #include <iostream> #include <algorithm> #include…
题意:最大困难=距离 / 相邻时间 #include<cstring> #include<cstdio> #include<cmath> #define ll double ll num[][]; #define max(a, b) (a)>(b)?(a):(b) int main() { int t; scanf("%d", &t); while (t--) { int n; scanf("%d", &n)…
题意:出现Apple.iPod.iPhone.iPad时输出MAI MAI MAI!,出现Sony,输出SONY DAFA IS GOOD! Sample InputApple bananaiPad lemon ApplepiSony233Tim cook is doubi from AppleiPhoneipadiPhone30 is so biiiiiiig Microsoftmakes good App. Sample OutputMAI MAI MAI!MAI MAI MAI!MAI M…
题意:我们建造了一个大项目!这个项目有n个节点,用很多边连接起来,并且这个项目是连通的!两个节点间可能有多条边,不过一条边的两端必然是不同的节点.每个节点都有一个能量值.现在我们要编写一个项目管理软件,这个软件呢有两个操作: 1.给某个项目的能量值加上一个特定值.2.询问跟一个项目相邻的项目的能量值之和.(如果有多条边就算多次,比如a和b有2条边,那么询问a的时候b的权值算2次). 链接:点我 暴力过 #include<cstdio> #include<iostream> #inc…
题意:n个点m条边,找点集个数,点集满足有任意三个点成环,或者三个点互不相连 题解:暴力复杂度O(n^5/120*O(ok))==O(能过) //#pragma comment(linker, "/stack:200000000") //#pragma GCC optimize("Ofast,no-stack-protector") //#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,…
Starship Hakodate-maru Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 751    Accepted Submission(s): 518 Problem Description The surveyor starship Hakodate-maru is famous for her two fuel conta…
Go to movies Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1029    Accepted Submission(s): 543 Problem Description Winter holiday is coming!As the monitor, LeLe plans to go to the movies.Becau…
Missing number Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1020    Accepted Submission(s): 518 Problem Description There is a permutation without two numbers in it, and now you know what num…
Have meal Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 756    Accepted Submission(s): 507 Problem Description I have been in school for several years, so I have visited all messes here. Now I…
Sum Sum Sum Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1033    Accepted Submission(s): 612 Problem Description We call a positive number X P-number if there is not a positive number that is…
Sequence Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 924    Accepted Submission(s): 499 Problem Description Today we have a number sequence A includes n elements.Nero thinks a number sequenc…
Love Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 875    Accepted Submission(s): 536 Problem Description There is a Love country with many couples of Darby and Joan in it. In order to commemo…
Beautiful Palindrome Number Time Limit: 3000/1500 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1067    Accepted Submission(s): 691 Problem Description A positive integer x can represent as (a1a2…akak…a2a1)10 or (a…
Summary Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 835    Accepted Submission(s): 424 Problem Description Small W is playing a summary game. Firstly, He takes N numbers. Secondly he takes o…
#include<stdio.h> int main() {  int n;  while(scanf("%d",&n),n) {   n=n*n-1;   if(n%2)    printf("8600\n");   else    printf("ailyanlu\n");  }  return 0; }…
题目链接: B. Modulo Sum time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output You are given a sequence of numbers a1, a2, ..., an, and a number m. Check if it is possible to choose a non-empty subse…
Higher Math Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2219    Accepted Submission(s): 1219 Problem Description You are building a house. You’d prefer if all the walls have a precise right…
p.MsoNormal { margin: 0pt; margin-bottom: .0001pt; text-align: justify; font-family: Calibri; font-size: 10.5000pt } h1 { margin-top: 5.0000pt; margin-bottom: 5.0000pt; text-align: center; font-family: 宋体; color: rgb(26,92,200); font-weight: bold; fo…
HDU 2096 /* HDU 2096 小明A+B --- 水题 */ #include <cstdio> int main() { #ifdef _LOCAL freopen("D:\\input.txt", "r", stdin); #endif int a, b, c, n; scanf("%d", &n); while (n--){ scanf("%d%d", &a, &b); a…