Acm
Kill acm
这个作者很懒,什么都没留下…
展开
-
Hdoj 1017 题解
A Mathematical Curiosity题意大致为:Given two integers n and m, count the number of pairs of integers (a,b) such that 0 < a < b < n and (a2+b2+m)/(ab) is an integer.利用循环和判断可以解决,关键在于输出的格式,组间要换行,而最...原创 2019-02-28 17:04:02 · 165 阅读 · 0 评论 -
大数阶乘
Reference:https://blog.csdn.net/tigerisland45/article/details/51530528https://www.cnblogs.com/blumia/p/hdu1042.html原创 2019-04-09 19:11:14 · 108 阅读 · 0 评论 -
Uva 1588习题总结
错误代码:#include<cstdio>#include<cstring>char b[201];char t[201];char tmp[101];unsigned int cnt=0;int main(){ while( (scanf("%s%s",b,t))!=EOF){ cnt=0; unsigned int lenb,lent; le...原创 2019-04-07 21:18:51 · 123 阅读 · 0 评论 -
Codeforces Round #379 (Div. 2) D. Anton and Chess
https://www.cnblogs.com/qscqesze/p/6069385.htmlhttps://blog.csdn.net/rain722/article/details/53200346原创 2019-04-10 20:43:19 · 145 阅读 · 0 评论 -
Hdoj 2080
题目:这次xhd面临的问题是这样的:在一个平面内有两个点,求两个点分别和原点的连线的夹角的大小。#include<stdio.h>#include<math.h>#define pi 3.1415926main(){ double s,a,b,x1,x2,y1,y2; int n; scanf("%d",&n); while(n--){...原创 2019-03-07 15:17:21 · 151 阅读 · 0 评论 -
HDU1013
Digit Root由于测试数字很大,所以用字符串储存变量。有两种办法,一种是用循环计算,另一种是运用数论知识。命题:任意一个数s mod 9=各个数位之和 mod 9;证明 :设自然数N=a[n]a[n-1]…a[0],其中a[0],a[1]、…、a[n]分别是个位、十位、…上的数字。 再设M=a[0]+a[1]+…+a[n] 即证 :N≡M(mod 9). ∵ N=a[...原创 2019-02-26 20:18:28 · 181 阅读 · 0 评论 -
HDU1012题解
题目 :u Calculate e关键在于循环的正确嵌套,总共有三层嵌套,分别是整体,Sum,分母。代码#include&lt;stdio.h&gt;main(){int i,j,k,t;double sum; printf("n e\n"); printf("- -----------\n"); printf("0 1\n");printf(&a原创 2019-02-25 22:14:03 · 269 阅读 · 0 评论 -
Hdoj 1065题解
题意:给定一个从原点开始且中心在原点的半圆,每天以50mile2的速度向外扩充,给你一个点,求第几天扩充的半圆能覆盖到它。题解:此类问题必须找规律,否则会受到超时或计算误差方面的困恼。计算出R[n]=100n/pi,求出n=[(xx + y*y) * pi / 100 + 1)]#include&lt;stdio.h&gt;main(){ int n,i,count; double ...原创 2019-02-28 19:57:35 · 171 阅读 · 0 评论 -
Hdoj 1018
题目 In many applications very large integers numbers are required. Some of these applications are using keys for secure transmission of data, encryption, etc. In this problem you are given a number, yo...原创 2019-02-28 18:53:49 · 133 阅读 · 0 评论 -
#553 (Div. 2) D 代码整理
#include <vector>#include <iostream>#include <algorithm>using namespace std;int main() { cin.tie(0); ios_base::sync_with_stdio(false); int N; cin >> N; vector<long ...原创 2019-04-19 14:34:32 · 176 阅读 · 0 评论