题目链接:617 - Nonstop Travel
题意:给定一些红绿灯,现在速度能在30-60km/h之内,求多少个速度满足一路不遇到红灯。
思路:暴力每一个速度,去判断可不可以,最后注意下输出格式即可
代码:
#include
#include
#include
const double esp = 1e-6;
int n, vis[105];
struct D {
do...
分类:
其他好文 时间:
2014-04-29 13:45:20
阅读次数:
333
1D people lived in a 1D country. Everything in the country was one-dimensional, and everything was simple and clear: just one axis and two directions — forward and backward. Even a 1D world has proble...
分类:
其他好文 时间:
2014-04-29 13:44:22
阅读次数:
284
Given a singly linked list L: L0→L1→…→Ln-1→Ln,
reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→…
You must do this in-place without altering the nodes' values.
For example,
Given {1,2,3,4}, reorder it to ...
分类:
其他好文 时间:
2014-04-29 13:42:21
阅读次数:
427
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=1588
#include
#include
#include
#include
#include
using namespace std;
#define N 10050
#define M 200005
int n,m;//n个点 m条边
struct Edge{...
分类:
其他好文 时间:
2014-04-29 13:25:21
阅读次数:
383
链接:http://soj.me/show_problem.php?pid=1007
Description
Mo and Larry have devised a way of encrypting messages. They first decide secretly on the number of columns and write the message (letter...
分类:
其他好文 时间:
2014-04-29 13:23:21
阅读次数:
293
本文只是作者本人在混迹于树莓派相关的论坛贴吧良久后的一些感想。纯属个人观点,限于本人能力有限,难免有所偏颇,还望斧正。
在能想到的所有品格中我认为最重要的就是这个:
LIY / TIY / DIY
Learn it yourself / Try it yourself / Do it yourself, 自己学、自己试、自己做。麻雀虽小五脏俱全,树莓派是一个复杂的系统,涉及到...
分类:
其他好文 时间:
2014-04-29 13:23:20
阅读次数:
300
1、
??
String to Integer (atoi)
Implement atoi to convert a string to an integer.
Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yours...
分类:
其他好文 时间:
2014-04-29 13:22:22
阅读次数:
341
The blonde Angela has a new whim: internet chats. Of course, as any blonde, she writes her messages using the upper case. You are the moderator of Angela's favorite chat and you're fed up with her upp...
分类:
其他好文 时间:
2014-04-29 13:17:21
阅读次数:
293
FAILED: Error in metadata: java.lang.RuntimeException: MetaException(message:org.apache.hadoop.hive.serde2.SerDeException org.apache.hadoop.hive.hbase.HBaseSerDe: columns has 3 elements while hbase.columns.mapping has 4 elements (counting the key if implic...
分类:
其他好文 时间:
2014-04-29 13:17:21
阅读次数:
387
1、
??
Reorder List
Given a singly linked list L: L0→L1→…→Ln-1→Ln,
reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→…
You must do this in-place without altering the nodes' values.
For example,
Given {1,2...
分类:
其他好文 时间:
2014-04-29 13:16:21
阅读次数:
250