暴力 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 ...
随机推荐
- java数据库连接池技术简单使用
JDBCDemo.java: package com.itheima.jdbc; import java.sql.Connection; import java.sql.PreparedStateme ...
- Android消息机制1-Handler(Java层)(转)
转自:http://gityuan.com/2015/12/26/handler-message-framework/ 相关源码 framework/base/core/java/andorid/os ...
- ImageViewCoverflow
https://github.com/Bertlk/ImageViewCoverflow https://github.com/dolphinwang/ImageCoverFlow http://ww ...
- CRF图像切割简单介绍
这里主要是讲Conditional Random Fields(CRF)用于pixel-wise的图像标记(事实上就是图像切割).CRF经经常使用于 pixel-wise的label 预測.当把像素的 ...
- 深度学习笔记之目标检测算法系列(包括RCNN、Fast RCNN、Faster RCNN和SSD)
不多说,直接上干货! 本文一系列目标检测算法:RCNN, Fast RCNN, Faster RCNN代表当下目标检测的前沿水平,在github都给出了基于Caffe的源码. • RCNN RCN ...
- 使用word模板生成pdf文件
使用word模板生成pdf文件 源码:UserWord
- 嵌入式开发之davinci--- 8168 电源调试总结
http://www.61ic.com/Article/DaVinci/TMS320DM81x/201403/51863.html
- go内存泄露case
用go写了一个守护进程程序:用于检測redis的存活状态并将结果写到zookeeper中,部署到redis机器上.对于每一个redis实例会有一个goroutine每隔固定时间去检測其状态,由主gor ...
- ie6不支持png图片的解决办法
在head里引入png.js文件 <!--[if lte IE 6]> <script type="text/javascript" src="js/P ...
- Override is not allowed when implementing interface method Bytecode Version Overriding and Hiding Methods
java - @Override is not allowed when implementing interface method - Stack Overflow https://stackove ...