- 博客(16)
- 收藏
- 关注
原创 XTU 1227 Digit
题目描述我们把十进制整数依次写成一个字符串,123456789101112…请问第n位数码是多少? 输入第一行是一个整数T(T≤10000),表示样例的个数。 每行输入一个整数n(1≤n≤788888899)。 输出每行输出一个样例的结果。 样例输入2 1 788888899样例输出1 1 最近在湘大oj上刷题,为湘大比赛做准备。感觉有点坑,题目不同的提交方式,竟然结果不同,无语了,然
2016-05-31 22:37:31 652
原创 hdu 5690 All X
Problem Description F(x,m) 代表一个全是由数字x组成的m位数字。请计算,以下式子是否成立:F(x,m) mod k ≡ cInput 第一行一个整数T,表示T组数据。 每组测试数据占一行,包含四个数字x,m,k,c1≤x≤91≤m≤10100≤c#include<iostream> #include<cstring> #include<algorithm> #incl
2016-05-23 16:46:38 176
原创 zoj 2236 Wireless Network
Description An earthquake takes place in Southeast Asia. The ACM (Asia Cooperated Medical team) have set up a wireless network with the lap computers, but an unexpected aftershock attacked, all comput
2016-05-20 12:01:48 483
原创 字典树模板
#include<iostream> #include<algorithm> #include<cstring> #include<string> #include<cmath> using namespace std; struct Trie { Trie *next[26]; int v; //根据需要变化 bool flag; Trie
2016-05-16 12:52:55 439
原创 国防科大校赛决赛-final(镜像赛) Problem A: XueXX and P-P String
DescriptionXueXX is a clever boy. And he always likes to do something with Palindrome String. What an interesting hobby! A palindrome is a symmetrical string, that is, a string read identically from l
2016-05-15 17:47:58 641
原创 国防科大校赛决赛-final(镜像赛) Problem C: XueXX and Chessboard
Description XueXX is a clever boy. And he always likes to do something with chessboard. What an interesting hobby! Now XueXX is in a n*m chessboard, and he needs to go from (1,1) to (n,m). There are
2016-05-15 17:45:19 621
原创 国防科大校赛决赛-final(镜像赛) Problem B: XueXX and Binary
Description XueXX is a clever boy. And he always likes numbers in binary(二进制). What an interesting hobby! Now XueXX has some number in decimal(十进制), he wants to know how many “1”s in a number if the
2016-05-15 17:43:21 169
原创 hdu hdu 5683 zxa and xor
zxa had a great interest in exclusive disjunction(i.e. XOR) recently, therefore he took out a non-negative integer sequence a1,a2,⋯,an of length n. zxa thought only doing this was too boring, hence a
2016-05-15 17:38:44 709 1
原创 hdu 5680 zxa and set
Problem Description zxa has a set A={a1,a2,⋯,an}, which has n elements and obviously (2n−1) non-empty subsets.For each subset B={b1,b2,⋯,bm}(1≤m≤n) of A, which has m elements, zxa defined its value as
2016-05-15 17:33:34 587
原创 2016"百度之星" - 资格赛(Astar Round1)
度熊面前有一个全是由1构成的字符串,被称为全1序列。你可以合并任意相邻的两个1,从而形成一个新的序列。对于给定的一个全1序列,请计算根据以上方法,可以构成多少种不同的序列。 Input这里包括多组测试数据,每组测试数据包含一个正整数NNN,代表全1序列的长度。1≤N≤2001\leq N \leq 2001≤N≤200 Output对于每组测试数据,输出一个整数,代表由题目中所给定的全1序列所能
2016-05-15 17:30:28 779
原创 zoj 2476 Total Amount
Given a list of monetary amounts in a standard format, please calculate the total amount.We define the format as follows: The amount starts with ‘$’. The amount could have a leading ‘0’ if and only if
2016-05-10 20:48:52 963
原创 hdu 5676 ztr loves lucky numbers
Problem Description ztr loves lucky numbers. Everybody knows that positive integers are lucky if their decimal representation doesn’t contain digits other than 4 and 7. For example, numbers 47, 744, 4
2016-05-08 23:55:48 458
原创 FZU Problem 2232 炉石传说
Problem DescriptionGG学长虽然并不打炉石传说,但是由于题面需要他便学会了打炉石传说。但是传统的炉石传说对于刚入门的GG学长来说有点复杂,所以他决定自己开发一个简化版的炉石传说。在简化版的炉石传说中:每个随从只有生命值和攻击力,并且在你的回合下,你的每只随从在本回合下只能选择一个敌方随从进行攻击。当两个随从a,b交战时,a的生命值将减去b的攻击力,b的生命值将减去a的攻击力,(两个
2016-05-07 22:08:48 1626
原创 FZU Problem 2231 平行四边形数
Problem Description在一个平面内给定n个点,任意三个点不在同一条直线上,用这些点可以构成多少个平行四边形?一个点可以同时属于多个平行四边形。 Input多组数据(<=10),处理到EOF。每组数据第一行一个整数n(4<=n<=500)。接下来n行每行两个整数xi,yi(0<=xi,yi<=1e9),表示每个点的坐标。 Output每组数据输出一个整数,表示用这些点能构成多少个平
2016-05-07 21:36:02 1550
原创 FZU Problem 2230 翻翻棋
Problem Description象棋翻翻棋(暗棋)中双方在4*8的格子中交战,有时候最后会只剩下帅和将。根据暗棋的规则,棋子只能上下左右移动,且相同的级别下,主动移动到地方棋子方将吃掉对方的棋子。将和帅为同一级别。然而胜负在只剩下帅和将的时候已定。 Input第一行T,表示T组数据。每组数据共有四行字符串,每行字符串共八个字符’#’表示空格’*’表示红方帅’.’表示黑方将此时红方先走每组输入
2016-05-07 21:27:10 1247
原创 hdu 5675 ztr loves math
Problem Description ztr loves research Math.One day,He thought about the “Lower Edition” of triangle equation set.Such as n=x2−y2.He wanted to know that ,for a given number n,is there a positive integ
2016-05-07 10:34:48 568
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人