04 2017 档案
摘要:先缩短一半的时间:早上的12个小时和下午的12小时对时钟是一样的,因为时钟12小时与0小时的三针位置相同。接着就是了解到每次所有的针从有重合到再次有重合至多有一段连续的段符合三针分离度大于n。所以只要枚举每个重合到重合的时间段,然后求出每段中符合条件的时间段即可。 由于枚举的是重合到...
阅读全文
摘要:Let us consider undirected graph G = which has N vertices and M edges. Incidence matrix of this graph is N * M matrix A = {a ij}, such that a ...
阅读全文
摘要:You must have heard that the Chinese culture is quite different from that of Europe or Russia. So some Chinese habits seem quite unusual or ev...
阅读全文
摘要:#include #include #define M 1000005 char s1[M],s2[M]; int a[M]; void ss(int m)//减运算 { int i=0,j; while(1) { if(s...
阅读全文
摘要:#include #include //大数乘小数void mult(char c[],int m,char t[]) { char s[100]; int len=strlen(c); for(int i=0; i=10) ...
阅读全文
摘要:描述 做了A+B Problem,A/B Problem不是什么问题了吧! 输入 每组测试样例一行,首先一个号码A,中间一个或多个空格,然后一个符号( / 或者 % ),然后又是空格,后面又是一个号码B,A可能会很长,B是一个int范围的数。 输出 输出结果。 样例输入 110 /...
阅读全文
摘要:DescriptionProblems involving the computation of exact values of very large magnitude and precision are common. For example, the computation o...
阅读全文
摘要:前m大的数 Time Limit: 1000 MS Memory Limit: 32768 KB 64-bit integer IO format: %I64...
阅读全文
摘要:There is a special number sequence which has n+1 integers. For each number in sequence, we have two rules: ● a i ∈ 0,n0,n ● a i ≠ a j( i ≠ j ...
阅读全文
摘要:Paula and Tai are couple. There are many stories between them. The day Paula left by airplane, Tai send one message to telephone 2200284, then...
阅读全文
摘要:Paula and Tai are couple. There are many stories between them. The day Paula left by airplane, Tai send one message to telephone 2200284, then...
阅读全文
摘要:问题描述Little A gets to know a new friend, Little B, recently. One day, they realize that they are family 500 years ago. Now, Little A wants to k...
阅读全文
摘要://加法#include#include#include#include#include#include#include#include#include//STL数值算法头文件#include#include #include#include#include#include//模板类...
阅读全文
摘要:There is a funny car racing in a city with n junctions and m directed roads.The funny part is: each road is open and closed periodically. Each...
阅读全文
摘要:费马大定理:当n>2时,不定方程an+bn=cn没有正整数解。比如a3+b3=c3没有正整数解。为了活跃气氛,我们不妨来个搞笑版:把方程改成a3+b3=c3,这样就有解了,比如a=4, b=9, c=79时43+93=793。输入两个整数x, y, 求满足x#include#incl...
阅读全文
摘要:https://cn.vjudge.net/contest/157163#problem/E#include#include#include#include#include#include#include#include//STL数值算法头文件#include#include #in...
阅读全文
摘要:http://blog.csdn.net/sunshinewave/article/details/8067862
阅读全文
摘要:DescriptionAn old story said the evil dragon wasn’t evil at all, only bewitched, and now that the riddles were solved it was proving to be as ...
阅读全文
摘要:问题描述: 宇航员在太空中迷失了方向,在他的起始位置现在建立一个虚拟xyz坐标系,称为绝对坐标系,宇航员正面的方向为x轴正方向,头顶方向为z轴正方向,则宇航员的初始状态如下图所示: 现对六个方向分别标号,x,y,z正方向分别为0,1,2,负方向分别为3,4,5;称它们为绝对...
阅读全文
摘要:We have learned how to obtain the value of a polynomial when we were a middle school student. If f(x) is a polynomial of degree n, we can let ...
阅读全文