- 博客(6)
- 收藏
- 关注
原创 UVa 1587 Box
题目:https://vjudge.net/problem/UVA-1587题意:给出6个矩形的长和宽,均小于10000,判断是否可组成一个长方体,可以的话,”输出 POSSIBLE“。否则输出“IMPOSSIBLE”解法:把6个面排序,先按宽度从小到大排,再把宽度相等的面按长度从小到大排。经上述方式排序后,要构成长方体,首先保证第1、2面,第3 、4面,第5、6面分别相同,而且,第2、 ...
2018-11-27 21:59:27 276
原创 Codeforce 1076B Divisor Subtraction 2/5
题目链接:http://codeforces.com/contest/1076/problem/BB. Divisor Subtractiontime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are...
2018-11-13 18:59:32 349
原创 codeforce 1076A Minimizing the String 1/5
题目链接:http://codeforces.com/contest/1076/problem/AA. Minimizing the Stringtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou ar...
2018-11-13 18:30:02 241
原创 HDU 6322 Euler Function (欧拉函数的求法) 1/5
题目链接:https://vjudge.net/problem/HDU-6322题意:给一个数k,求第k小的n值,n满足φ(n)是合数。欧拉函数定义:小于n的正整数中与n互质的数的数目就是φ(n)的值,n为正整数。对欧拉函数打表发现,只有1 2 3 4 6 的欧拉函数值不是合数,则满足要求的第1小对应的n值为5,其余则为k+5;代码:#include<stdio.h&g...
2018-11-06 17:00:16 147
原创 POJ 3468 A simple problem with Integers (线段树区间更新,区间查询) 2/5
题目链接:http://poj.org/problem?id=3468首先,感谢雨巨的线段树入门视频,可算让我整明白线段树的原理,还学到了一些编码的技巧。orz,再次感谢雨巨。这道题目就是裸的线段树,区间更新,区间查询代码:#include <stdio.h>typedef long long ll;struct SeTreeNode { int lef...
2018-11-02 20:40:18 117
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人