摘要:View Code #includeint x, y;void kzgcd(int a,int b){ if(!b) x = 1, y = 0; else { kzgcd(b,a%b); int t = y; y = x-(a...
阅读全文
摘要:View Code Problem Description Ignatius bought a land last week, but he didn't know the area of the land because the land is enclosed by a parabola and...
阅读全文
摘要:View Code 文件查找_finddata_t的使用 那么到底如何查找文件呢?我们需要一个结构体和几个大家可能不太熟悉的函数。这些函数和结构体在的头文件中,结构体为struct _finddata_t ,函数为_findfirst、_findnext和_fineclose。具体如何使用,...
阅读全文
摘要:错了好几次,因为在定义pi的时候直接标释成了3.1415926,不能直接标释成这个,要用到反三角函数,注意这点View Code #include#includeconst double pi = acos(-1.0);int main(){ double b, h, r, t, _h, y;...
阅读全文
摘要:View Code #include#includeint main(){ double a, b, m, n, s, l, angle; while(scanf("%lf%lf%lf%lf%lf",&a,&b,&s,&m,&n) && a+b+s+m+n) { an...
阅读全文
摘要:题目已经给出来了公式,求面积的,不过也可以在百度上找到其他的求面积公式,只是想要寻找内部和边缘都没有点的三角形,我刚开始没想到很好的办法,后来看到一位前辈的方法,确实很简单的就能理解了,只是让自己想的话,就算是费上半天的劲,也想不到好的办法View Code #include#includedoub...
阅读全文
摘要:View Code Friday the ThirteenthIs Friday the 13th really an unusual event? That is, does the 13th of the month land on a Friday less often than on any...
阅读全文
摘要:错的很狗血View Code #include#includeint main(){ double m, n, t; char ch; while(scanf("%lf%c%lf",&m,&ch,&n) && (m||n)) { if(n == 0) ...
阅读全文
摘要:AC如此简单,只要用心做,没什么不可以View Code #includeint main(){ int T, k, f[4], top, j; scanf("%d",&T); for(int i = 0;i < T; i++) { top = 0; ...
阅读全文
摘要:简单,读题加AC用了很短的时间,我自己单独把题目意思揣摩出来的,呵呵View Code #include#includeint main(){ long long f[50000], n, i, k, m; k = 0; for(n = 2;k sqrt(n)) ...
阅读全文
摘要:View Code Greedy Gift GiversA group of NP (2 ≤ NP ≤ 10) uniquely named friends has decided to exchange gifts of money. Each of these friends might or ...
阅读全文
摘要:View Code Your Ride Is HereIt is a well-known fact that behind every good comet is a UFO. These UFOs often come to collect loyal supporters from here ...
阅读全文
摘要:这题到底是啥意思啊?》线性同余也不是,好像不是数论里面的内容啊,怎么都看不懂它是在搞什么东西的看了别人的题解,写的代码View Code #includeusing namespace std;int main(){ int k, m, n; while(cin >> k >> m >>...
阅读全文
摘要:View Code #includeint main(){ int Z, I, M, L, i = 1; while(scanf("%d%d%d%d",&Z,&I,&M,&L) && (Z||I||M||L)) { int f[10002] = {0}, k = -1...
阅读全文