摘要:
Statements Alice and Bob play the following game. They choose a number N to play with. The rules are as follows: - They write each number from 1 to N 阅读全文
摘要:
Let's define the function f(n)=⌊n−−√⌋f(n)=⌊n⌋. Bo wanted to know the minimum number yy which satisfies fy(n)=1fy(n)=1. note:f1(n)=f(n),fy(n)=f(fy−1(n) 阅读全文
摘要:
There are n houses in the village and some bidirectional roads connecting them. Every day peole always like to ask like this "How far is it if I want 阅读全文
摘要:
A rooted tree is a well-known data structure in computer science and engineering. An example is shown below: In the figure, each node is labeled with 阅读全文
摘要:
1 #include 2 #include 3 using namespace std; 4 5 int main() 6 { string s="傻狗"; 7 for (float y=1.3;y>=-1.1;y-=0.06) 8 { 9 int index=0; 10 for(float x=-1.1;x<=1.1;x+=0.025) 11 ... 阅读全文
摘要:
1 /* 2 题目描述 3 4 有两个日期,求两个日期之间的天数,如果两个日期是连续的,则规定它们之间的天数为两天。 5 输入格式 6 7 有多组数据,每组数据有两行,分别表示两个日期,形式为YYYYMMDD 8 输入格式 9 10 每组数据输出一行,即日期差值 11 样例输入 12 13 20130101 14 20130105 15 样例输出 16 17 5 18... 阅读全文
摘要:
1 /* 2 题目描述 3 输入两个非负十进制整数A和B( 24 #include 25 using namespace std; 26 27 int main() 28 { int a,b,d; 29 scanf("%d%d%d",&a,&b,&d); 30 int sum=a+b; 31 int ans[31],num=0; //ans存放D进制... 阅读全文
摘要:
/* 题目描述 给定一个英语,要求编写程序,将句中所有单词按颠倒顺序输出 输入格式 测试输入包含一个测试用例,在一行内给出总长度不超过80的字符串。字符串由若干单 词和若干空格组成,其中单词是由英文字母(大小写有区分)组成的字符串,单词之间用1个 空格分开,输入保证句子末尾没有多余的空格。 输入格式 每个测试用例的输出展一行,出倒叙后的句子。 样例输入 Hello World Here I... 阅读全文
摘要:
There are N jobs to be finished. It takes a robot 1 hour to finish one job. At the beginning you have only one robot. Luckily a robot may build more r 阅读全文
摘要:
Saitama accidentally destroyed a hotel again. To repay the hotel company, Genos has volunteered to operate an elevator in one of its other hotels. The 阅读全文