暴力 BestCoder Round #46 1001 YJC tricks time
/*
暴力:模拟枚举每一个时间的度数
详细解释:http://blog.csdn.net/enjoying_science/article/details/46759085
期末考结束第一题,看看题解找找感觉:)
*/
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <vector>
#include <iostream>
using namespace std; typedef long long ll;
const int MAXN = 1e3 + ;
const int INF = 0x3f3f3f3f; int main(void) //BestCoder Round #46 1001 YJC tricks time
{
// freopen ("A.in", "r", stdin); int n;
while (scanf ("%d", &n) == )
{
for (int i=; i<=; ++i)
{
for (int j=; j<=; ++j)
{
for (int k=; k<=; k+=)
{
ll di = (i * + j * + k) * ; //不是很懂
ll dj = (j * + k) * ;
ll t = abs (di - dj);
if (t > ) t = - t; //劣角
if (t == n)
{
printf ("%02d:%02d:%02d\n", i, j, k);
}
}
}
}
} return ;
}
暴力 BestCoder Round #46 1001 YJC tricks time的更多相关文章
- 暴力 BestCoder Round #41 1001 ZCC loves straight flush
题目传送门 /* m数组记录出现的花色和数值,按照数值每5个搜索,看看有几个已满足,剩下 5 - cnt需要替换 ╰· */ #include <cstdio> #include < ...
- 贪心 BestCoder Round #39 1001 Delete
题目传送门 /* 贪心水题:找出出现次数>1的次数和res,如果要减去的比res小,那么总的不同的数字tot不会少: 否则再在tot里减去多余的即为答案 用set容器也可以做,思路一样 */ # ...
- BestCoder Round #46
1001 YJC tricks time 题目链接:1001 题意:给你时针和分针所成的角度,输出现在的时间,以10秒为单位 思路:每10秒,分针走1度,时针走分针的1/12,我们可以根据时间来分别计 ...
- 字符串处理 BestCoder Round #43 1001 pog loves szh I
题目传送门 /* 字符串处理:是一道水题,但是WA了3次,要注意是没有加'\0'的字符串不要用%s输出,否则在多组测试时输出多余的字符 */ #include <cstdio> #incl ...
- BestCoder Round #75 1001 - King's Cake
Problem Description It is the king's birthday before the military parade . The ministers prepared a ...
- BestCoder Round #92 1001 Skip the Class —— 字典树 or map容器
题目链接:http://bestcoder.hdu.edu.cn/contests/contest_showproblem.php?cid=748&pid=1001 题解: 1.trie树 关 ...
- BestCoder Round #61 1001 Numbers
Problem Description There are n numbers A1,A2....An{A}_{1},{A}_{2}....{A}_{n}A1,A2....An,yo ...
- BestCoder Round #87 1001
GCD is Funny Accepts: 524 Submissions: 1147 Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 655 ...
- BestCoder Round #60 1001
Problem Description You are given a sequence of NNN integers. You should choose some numbers(at leas ...
随机推荐
- ffm算法
www.csie.ntu.edu.tw/~cjlin/papers/ffm.pdf 读书笔记 The effect of feature conjunctions(组合特征) is difficul ...
- C++:vector中的resize()函数 VS reserve()函数
http://www.cnblogs.com/biyeymyhjob/archive/2013/05/11/3072893.html
- Lync 2013 与Exchange 2013 UM&UC 集成!
设置好对应的拨号计划.我们设置分机号码为4位: 配置好接入号码为5000: 配置自己主动助理号码为6000: 改动UM拨号模式为双模式: Set-UMService -identity Exch ...
- Python中字符运算的优先级
表1-2 运算符优先级 运算符 描述 lambda Lambda表达式 or 布尔“或” and 布尔“与” not x 布尔“非” in,not in 成员测试 is,is not 同一性测试 &l ...
- 在matlab中生成m序列
实验环境为matlab2013b 1.首先编写一个mseq.m文件,内容为: function[mseq]=m_sequence(fbconnection) n=length(fbconnectio ...
- Webx框架:依赖注入
Webx的依赖注入和Spring的依赖注入很像,仅仅是有一点点的差别. 注入的时候仅仅能让生命周期长的注入到生命周期短的对象中,比方requestScope对象注入到singleton时就会错误发生. ...
- Installation error: INSTALL_FAILED_CPU_ABI_INCOMPATIBLE
解决方法: http://my.oschina.net/u/242764/blog/375909 当我们安装好Genymotion后,把Android运用部署到上面调试时,console 控制台会报错 ...
- String的属性和方法
package com.zzu.java.array; public class TtString { /** * @author 程路超 * @param args */ public static ...
- MTK 电池曲线配置【转】
本文转载自:http://blog.csdn.net/u010245383/article/details/51006597 硬件平台:MT8382 网上有很多关于电池曲线配置的文档,定位到具体的文件 ...
- 如何完成dedecms外部数据库调用|跨数据库数据调用
第1步:打开网站include\taglib文件夹中找到sql.lib.php文件,并直接复制一些此文件出来,并把复制出来的这个文件重命名为mysql.lib.php. 注:mysql.lib.php ...