- 博客(10)
- 收藏
- 关注
原创 codeforces 915C Permute Digits
DescriptionYou are given two positive integer numbers a and b. Permute (change order) of the digits of a to construct maximal number not exceeding b. No number in input and/or output can start with
2018-01-26 14:29:34 339
原创 第一届ACM金牌训练营网络测试赛 C. Math(简单数学)
Description对于一个数对 (a,b),如果满足 a%b=a/b,则称这个数对为“好的数对”。如果 a≤n,b≤n" role="presentation" style="position: relative;">a≤n,b≤na≤n,b≤na\le n,b\le n, 那么有多少对数对是“好的数对”呢?Input多组数据。 每组数据一行,一个数表
2018-01-25 11:14:26 602
原创 EOJ 3486. 最大的子串(劝退题+挖坑)
Description字符串的大,不在于长,而在于妙。现在给出由数字组成的字符串 s,求出字符串的所有的非空连续子串中,最妙的那个子串。一个字符串的妙是这样定义的:将这个子串所表示的整数(有可能带前导 0),除以 10L(其中 L 为字符串的长度)。比如说 123456789 的子串 456 的妙为 456103=0.456456103=0.456\frac{456}{{10}^3}=...
2018-01-24 17:43:13 525 2
转载 ACM中的浮点数精度处理
原文链接 在ACM中,精度问题非常常见。其中计算几何头疼的地方一般在于代码量大和精度问题,代码量问题只要平时注意积累模板一般就不成问题了。精度问题则不好说,有时候一个精度问题就可能成为一道题的瓶颈,让你debug半天都找不到错误出在哪。1.浮点数为啥会有精度问题:浮点数(以C/C++为准),一般用的较多的是float, double。 占字节数 数值范围
2018-01-24 16:02:37 239
原创 51nod 1298 圆与三角形(几何知识)
Description给出圆的圆心和半径,以及三角形的三个顶点,问圆同三角形是否相交。相交输出”Yes”,否则输出”No”。(三角形的面积大于0)。 Input第1行:一个数T,表示输入的测试数量(1 4-1:三个数,前两个数为圆心的坐标xc, yc,第3个数为圆的半径R。(-3000 4-2:2个数,三角形第1个点的坐标。 4-3:2个数,三角形第2个点的坐标。 4
2018-01-24 15:12:36 206
原创 Python反弹球精简版
说明:在游戏界面点击鼠标左键开始游戏,小球的移动速度每次游戏均为随机获得,键盘左右键控制木板的移动,每接到一次小球score+2,小球落地游戏结束from tkinter import *import timeimport random#创建小球class Ball: def __init__(self,canvas,paddle,color): self.c
2018-01-23 22:08:20 1732
原创 Python界面组成元素小记
from turtle import *import randomfrom tkinter import *import timefrom tkinter.colorchooser import *# import tkinter.colorchooser as colorchooser#练习1(创建按钮)# def hello():# print("hello worl
2018-01-23 21:43:47 271 4
原创 codechef Partition the numbers(思维)
DescriptionYou are given two integers x and N. Consider all integers between 1 and N inclusive, except x. We want to partition these integers into two disjoint sets (each integer has to appear in ex
2018-01-18 22:48:18 407
原创 Codeforces Hello 2018 C. Party Lemonade(思维)
DescriptionA New Year party is not a New Year party without lemonade! As usual, you are expecting a lot of guests, and buying lemonade has already become a pleasant necessity.Your favorite store s
2018-01-11 22:21:39 302
原创 Codeforces Hello 2018 B.Christmas Spruce
DescriptionConsider a rooted tree. A rooted tree has one special vertex called the root. All edges are directed from the root. Vertex u is called a child of vertex v and vertex v is called a parent
2018-01-11 22:04:31 314
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人