解题报告
算是规律题吧,,,x y z -x -y -z
注意的是如果数是小于0,要先对负数求模再加模再求模
给我的戳代码跪了,,,
#include
#include
#include
using namespace std;
long long x,y,z;
long long n;
int main()
{
cin>>x>>y;
cin>>n;
z=y...
分类:
其他好文 时间:
2014-07-22 22:49:15
阅读次数:
225
1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 using namespace std; 8 typedef long long INT; 9 const INT MOD = 1000000007; 10 co....
分类:
其他好文 时间:
2014-07-22 22:48:35
阅读次数:
247
下面代码就是获取到用户通讯录头像的代码: ContentResolver?cr?=?view.getContext().getContentResolver();
Uri?uri?=?ContentUris.withAppendedId(ContactsContract.Contacts.CONTENT_URI,
Long.parseLon...
分类:
其他好文 时间:
2014-07-22 09:13:35
阅读次数:
175
大赞的数论题;大致思路: 对于TYPE=1的情况,认为 X 中有 X-K个约数,求最小的X,X-K>0 那么化为B+K的约数为B, 我们知道(B+K)的约数#include#include#includetypedef long long ll;using namespa...
分类:
其他好文 时间:
2014-07-19 16:03:52
阅读次数:
230
UVA 10733 - The Colored Cubes
题目链接
题意:一个立方体,n种颜色,问能涂成多少不同立方体
思路:Ploya求解,正方体对应24种不同旋转一一计算出循环个数即可,和
UVA 10601 - Cubes这题类似
代码:
#include
#include
unsigned long long n;
int main() {
w...
分类:
其他好文 时间:
2014-07-19 14:07:23
阅读次数:
189
public long getSDTotalSize(){ /*获取存储卡路径*/ File sdcardDir= Environment.getExternalStorageDirectory(); /*StatFs 看文件系统空间使用情况*/ StatFs statFs=...
分类:
移动开发 时间:
2014-07-19 13:33:04
阅读次数:
192
迷宫寻宝(一)时间限制:1000ms | 内存限制:65535KB难度:4描述一个叫ACM的寻宝者找到了一个藏宝图,它根据藏宝图找到了一个迷宫,这是一个很特别的迷宫,迷宫里有N个编过号的门(N 2 #include 3 #include 4 #define LL long long 5 usin.....
分类:
其他好文 时间:
2014-07-19 11:29:24
阅读次数:
189
Sticks时间限制:3000ms | 内存限制:65535KB难度:5描述George took sticks of the same length and cut them randomly until all parts became at most 50 units long. Now he...
分类:
其他好文 时间:
2014-07-19 11:27:30
阅读次数:
264
基本数据类型:8种
1.整型:
byte 1个字节 8位 -128到127
short
2个字节 16位 -2^15到(2^15)-1
int
4个字节 32位 -2^32到(2^32)-1
long 8个字节 64位 -2^64到(2^64)-1
2.浮点类型:
float 4个字节 32位
double...
分类:
编程语言 时间:
2014-07-19 08:24:42
阅读次数:
263
线上程序不断重启,查看log发现是进程因为SIGXFSZ信号退出。对过大的文件进行操作的时候会产生此信号,一般只在32位机器上出现,文件大小限制为2G。用lsof查看进程打开的文件,果然有一个文件达到2G。
解决方案:编译时加上参数:-D_FILE_OFFSET_BITS=64;代码中调用lseek时参数为off_t(不要为int或long,否则在32位和64位中表现不同)。
...
分类:
系统相关 时间:
2014-07-19 08:18:29
阅读次数:
281