
acm入门
久石_giao
今天是个好日子!!!
展开
-
进制转换
进制转换 Problem Description 输入一个十进制数N,将它转换成R进制数输出。Input 输入数据包含多个测试实例,每个测试实例包含两个整数N(32位整数)和R(2<=R<=16, R<>10)。Output 为每个测试实例输出转换后的数,每个输出占一行。如果R大于10,则对应的数字规则参考16进制(比如,10用A表示,等等)。Sam...原创 2017-04-06 15:53:30 · 229 阅读 · 0 评论 -
hdoj 1014 Uniform Generator
Uniform Generator(链接)Sample Input3 515 2063923 99999 Sample Output 3 5 Good Choice 15 20 Bad Choice 63923 99999 Good Choi原创 2017-12-06 20:03:53 · 173 阅读 · 0 评论 -
hdoj 1570 A C
A C(链接)Problem DescriptionAre you excited when you see the title "AC" ? If the answer is YES , AC it ;You must learn these two combination formulas in the school . If you have forgotten原创 2017-12-02 16:23:32 · 216 阅读 · 0 评论 -
hdoj 1280 前m大的数
前m大的数(链接)Problem Description还记得Gardon给小希布置的那个作业么?(上次比赛的1005)其实小希已经找回了原来的那张数表,现在她想确认一下她的答案是否正确,但是整个的答案是很庞大的表,小希只想让你把答案中最大的M个数告诉她就可以了。 给定一个包含N(N Input输入可能包含多组数据,其中每组数据包括两行: 第原创 2017-12-02 16:18:24 · 159 阅读 · 0 评论 -
hdoj 1180 诡异的楼梯 bfs bfs bfs
诡异的楼梯(题目链接)#include#include#include#include#includeusing namespace std;char mat[25][25]; //地图int qq[20][20]; //标记int n,m,ans=9999;bool flag;int dir[4][2]={0,1,0,-1,1,0,-1,0};struct原创 2017-07-23 17:26:34 · 241 阅读 · 0 评论 -
hdoj 1072 Nightmare 广搜
Nightmare(链接)#include#include#include#includeusing namespace std;int t,n,m;int mat[10][10];int dir[4][2]={0,1,0,-1,1,0,-1,0};struct Node{ int x,y,ans,time;}s,t1,t2;void bfs() //广搜原创 2017-07-23 10:09:55 · 202 阅读 · 0 评论 -
hdoj 1010 Tempter of the Bone
Tempter of the BoneProblem DescriptionThe doggie found a bone in an ancient maze, which fascinated him a lot. However, when he picked it up, the maze began to shake, and the doggie could feel the groun原创 2017-07-22 20:28:43 · 242 阅读 · 0 评论 -
hdoj 1065 水水
报考杭州电子科技大学! I Think I Need a HouseboatTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 13214 Accepted Submission(s): 3751原创 2017-06-20 20:21:06 · 336 阅读 · 0 评论 -
hdoj 1017-A Mathematical Curiosity
A Mathematical CuriosityTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 41332 Accepted Submission(s): 13290Problem DescriptionGiven two integ原创 2017-06-08 20:54:03 · 281 阅读 · 0 评论 -
HDOJ 1017-A Mathematical Curiosity
A Mathematical CuriosityTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 41332 Accepted Submission(s): 13290Problem DescriptionGiven two inte原创 2017-07-22 20:11:30 · 267 阅读 · 0 评论 -
如何输出程序段所运行时间
陈越姥姥讲的数据结构很不错(⊙o⊙)!#include<stdio.h>#include<time.h>#include<math.h>clock_t start,stop; //包含在time.h头文件中double duration;#define MAXN 10int main(){ int i; double a[MAXN]; start=cl原创 2017-05-18 21:14:32 · 525 阅读 · 0 评论 -
A.谍报分析
A.谍报分析 “八一三”淞沪抗战爆发后,*几次准备去上海前线视察和指挥作战。但都因为宁沪之间的铁路和公路遭到了敌军的严密封锁,狂轰滥炸,一直未能成行。 特科组织,其主要任务是保卫**的安全,了解和掌握敌方的动向。经过一段时间的监听,谍报组获取了敌方若干份密报,经过分析,发现了密文中频繁出现一些单词,情报人员试图从单词出现的次数中,推出敌军的行动计划。 请你编程,原创 2017-05-09 21:18:17 · 335 阅读 · 0 评论 -
NYOJ 20 吝啬的国度
吝啬的国度时间限制:1000 ms | 内存限制:65535 KB 难度:3 描述 在一个吝啬的国度里有N个城市,这N个城市间只有N-1条路把这个N个城市连接起来。现在,Tom在第S号城市,他有张该国地图,他想知道如果自己要去参观第T号城市,必须经过的前一个城市是几号城市(假设你不走重复的路)。 输入 第一行输入一个整数M表示测试数据共有M(1<=M<=5)组 每组测试数据的第一行输原创 2017-05-05 12:41:54 · 248 阅读 · 0 评论 -
ZOJ 1006
Do the Untwist Time Limit: 2 Seconds Memory Limit: 65536 KB Cryptography(加密) deals with methods of secret communication that transform a message (the plaintext) into a disguised form (t原创 2017-05-04 21:09:34 · 243 阅读 · 0 评论 -
ZOJ 1003
Crashing Balloon Time Limit: 2 Seconds Memory Limit: 65536 KB On every June 1st, the Children's Day, there will be a game named "crashing balloon" on TV. The rule is very simple. On th原创 2017-05-04 21:06:38 · 261 阅读 · 0 评论 -
阶乘的因式分解(一)
阶乘因式分解(一)时间限制:3000 ms | 内存限制:65535 KB难度:2描述给定两个数m,n,其中m是一个素数。将n(0输入第一行是一个整数s(0随后的s行, 每行有两个整数n,m。输出输出m的个数。样例输入2100 516 2样例输出2415阶乘因式分解( 1原创 2017-05-10 20:49:54 · 244 阅读 · 0 评论 -
一些基础函数
判断素数int prime(int n){ int i,a; a=sqrt(n); for(i=2;i<=a;i++) { if(n%i==0) return 0; } return 1;}最大公约数long gcd(long a, long b){ long c; if(a < b)原创 2017-04-06 22:01:29 · 194 阅读 · 0 评论 -
问题 1443: [蓝桥杯][历届试题]数字游戏
数字游戏题目描述栋栋正在和同学们玩一个数字游戏。 游戏的规则是这样的:栋栋和同学们一共n个人围坐在一圈。栋栋首先说出数字1。接下来,坐在栋栋左手边的同学要说下一个数字2。再下面的一个同学要从上一个同学说的数字往下数两个数说出来,也就是说4。下一个同学要往下数三个数,说7。依次类推。 为了使数字不至于太大,栋栋和同学们约定,当在心中数到原创 2018-03-21 21:23:08 · 407 阅读 · 0 评论