这是我的问题HDU在第一的第二手表遇到的问题,他们是非常具有欺骗性! 首先。我想大家都出问题理解。实上吧,我认为这题HDU的思想有问题。钟表是一秒一秒走的,哪有连续时间。表示不解!但题目要求,木有办法了。其次呢,结果要求保留三位有效数字。这也就直接导致了:假设离散的来记录满足条件的时间的话,会在精...
转载
2015-06-10 17:21:00
71阅读
2评论
这题是我在HDU上第二次遇到的关于钟表的问题,都非常坑人! 首先,我想大家都会在理解上出问题。事实上吧,我认为这题HDU的思想有问题,钟表是一秒一秒走的,哪有连续时间,表示不解!但题目要求,木有办法了。其次呢,结果要求保留三位有效数字。这也就直接导致了:假设离散的来记录满足条件的时间的话,会在精度...
转载
2014-11-13 14:13:00
19阅读
2评论
Tick and TickTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Jav
原创
2022-09-26 14:45:40
70阅读
题目大意:现在有一个普通时钟,有时针、分针、秒针,秒针不是一秒一秒间断走的,而是连续走的。给
原创
2015-01-17 18:42:51
71阅读
Tick and TickTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 5214Accepted Submission(s): 1402Problem DescriptionThe three hands of the clock are rotating every second and meeting each other many times everyday. Finally, they get bored of this and e
原创
2021-07-29 16:23:49
413阅读
The three hands of the clock are rotating every second and=
原创
2022-06-17 14:12:37
98阅读
想了半天,写了半天,多次TLE,WA后终于AC。。。 其实只要注意一些问题这个题目思路还是很简单的。1. 时间是连续走的,从文中“rotating every second”(注意rotate 是加了 ing 的) ,表示每秒钟都在不停的走。这个问题坑了我很久, 一开始用一秒一秒模拟, 然后90 时就为6.255。。。 这个是必须错的,然后就知道了不是一秒一秒动的,然后天真的以为可以将一秒分成1000ms来精确,可是出题人怎么可能让我得逞, 果断TLE,发现就是分成10ms也是TLE。。。 无奈只有想新方法。。既然不能离散成一秒一秒,那么就连续的一起求, 于是就想到了看秒针走一圈中有多少路程是
转载
2013-06-04 22:08:00
75阅读
Tick and Tick
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
The three hand
原创
2023-08-21 16:39:44
96阅读
/*模拟实例:331 10 552 10 3361 3 2 11 4 2 11 5 211 6 211 7 2 15 20 81 2 3 4 51 20 850 20 82423345445*/#include#include#define N 2100000int a[N];int num;in...
转载
2014-09-22 12:20:00
50阅读
2评论
Tick and TickTime
原创
2022-08-12 10:03:18
107阅读
Tick and Tick Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 16707 Accepted Submission(s): 4083
转载
2016-05-08 18:44:00
88阅读
// Time 46ms, Memory 328K#include
#include
using namespace std;
double d;
struct range
{ double l,r;
};
range get(double a,double b)
{ range p; if(a60) p.r=60; if(p.l>p.r) p.l=p.r=0; return p;
}
range set(range a,range b)
{ range p; p.l=a.l>b.l?a.l:b.l; p.r=a.r>b.r?b....
转载
2013-06-14 00:33:00
78阅读
2评论
2021暑假 HDU中超 第九场 1006 Guess the weight *Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others) Total Submission(s): 235 Ac ...
转载
2021-08-18 20:00:00
92阅读
2评论
1006换个格式输出整数(15分)让我们用字母B来表示“百”、字母S表示“十”,用12...n来表示不为零的个位数字n(<10),换个格式来输出任一个不超过 3 位的正整数。例如234应该被输出为BBSSS1234,因为它有 2 个“百”、3 个“十”、以及个位的 4。输入格式:每个测试输...
原创
2021-07-12 15:04:42
78阅读
。。。还能多说什么。眼角一滴翔滑过。一直以为题意是当前串与所有之前输入的串的LCP。。。然后就T了一整场。扫了一眼标程突然发现他只比较输入的串和上一个串?我心中突然有千万匹草泥马踏过。然后随手就A了。。。
转载
2013-08-20 21:44:00
64阅读
2评论
StringTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 11Accepted Submission(s): 4Problem DescriptionGiven 3 strings A, B, C, find the longest string D which satisfy the following rules:a) D is the subsequence of Ab) D is the subsequence of Bc) C is
转载
2013-08-15 17:06:00
41阅读
2评论
Fibonacci TreeTime Limit: 4000/2000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 75Accepted Submission(s): 38Problem Description Coach Pang is interested in Fibonacci numbers while Uncle Yang wants him to do some research on Spanning Tree. So Coach Pang decides to s.
转载
2013-11-18 11:12:00
56阅读
2评论
直接使用中国剩余定理#include #include #include using namespace std;int r=3;int m[4]={0,23,28,33};int a[4]={0};void exgcd(int a,int b,int &d,int &x,int &y){ if(b...
转载
2014-09-01 10:25:00
27阅读
2评论
codeCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--1#include<iostream>2usingnamespacestd;34intmain()5{6intp,e,i,d;7intj=0;8while(cin>>p&g...
转载
2010-08-16 12:26:00
50阅读
2评论
#include struct pNode{...
转载
2017-07-23 18:52:00
77阅读
2评论