暴力 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 ...
随机推荐
- php monolog 的写日志到unix domain socket 测试终于成功
在另外一个客户端执行 php s.php后, 通过nc -lU /tmp/tg.sck 建立的unix domain socket 有接收到消息. <?php require 'vendor/a ...
- Puppet基于Master/Agent模式实现LNMP平台部署
前言 随着IT行业的迅猛发展,传统的运维方式靠大量人力比较吃力,运维人员面对日益增长的服务器和运维工作,不得不把很多重复的.繁琐的工作利用自动化处理.前期我们介绍了运维自动化工具ansible的简单应 ...
- Python 基础语法(和Java相比)
Python变量和数据类型 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 ...
- ssh配置无password登录
前提.机器A,B,均为RedHat Linux操作系统,均实用户user 1.以usernameuser登录,在A机器上运行 ssh-keygen -t rsa 一路回车.不须要输入password ...
- OpenGL中视点模型坐标的理解
个人的理解: gluLookAt中的eye.center和up的坐标原点是ModelView中的坐标原点,右手坐标系,Z轴正向指向显示器外侧 glOrtho中的near和far参数距离相对eye而言, ...
- ASP.NET MVC 提供与访问 Web Api
ASP.NET MVC 提供与访问 Web Api 一.提供一个 Web Api 新建一个项目,类型就选 "Web Api".我用的是MVC5,结果生成的项目一大堆东西,还编译不过 ...
- is和==的区别,小数据池,编码
1 is 和 == 的区别 1> id( )表示我们可以通过它来查到在内存中的地址 s = "alex" lst = [1,2, 4] lst = [1, 2, ...
- apt-pkg
1 什么是apt-pkg python的apt库,可以做apt可以做的任何事情. 2 apt_pkg.parse_depends(depends, strip_multiarch=True) 这里的d ...
- How can I pass data from Flask to JavaScript in a template?
https://stackoverflow.com/questions/11178426/how-can-i-pass-data-from-flask-to-javascript-in-a-templ ...
- JDBC 详解
工作原理流程:装载驱动程序---->获得数据库连接---->使用Statement或PreparedStatement执行SQL语句----> 返回执行的结果---->关闭相关 ...