枚举+二分查找。
A+B+C >= K ----> C >= K - A -B ----> 统计大于等于C的个数即可。
#include
#include
#include
#include
#include
#include
using namespace std;
int a[1010];
int Scan() //输入外挂
{
int...
分类:
其他好文 时间:
2014-05-07 02:52:11
阅读次数:
322
public static long getTotalSize(String device) {
StatFs sf = new StatFs (device);
//long totalblocks = sf.getBlockCountLong();
//long freeblocks = sf.getFreeBlocksLong();//为使用的,包括 系统保留的部分
long a...
分类:
其他好文 时间:
2014-05-07 02:41:20
阅读次数:
323
来源:http://poj.org/problem?id=2121
Inglish-Number Translator
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 4475
Accepted: 1747
Description
In th...
分类:
其他好文 时间:
2014-05-06 23:29:32
阅读次数:
419
#include
using namespace std;
class Stu //声明基类
{
public:
Stu(int n, string nam ); //基类构造函数
void display( ); //成员函数,输出基类数据成员
protected: //(*)访问权限为保护型的数据成员
int nu...
分类:
其他好文 时间:
2014-05-06 23:20:29
阅读次数:
296
#include
using namespace std;
class Stu
{
public:
Stu (int n,string nam);
void display();
protected:
int num; //学号
string name; //姓名
};
Stu::Stu(int n,st...
分类:
其他好文 时间:
2014-05-06 21:35:26
阅读次数:
292
'''题目:输入某年某月某日,判断这一天是这一年的第几天?
1.程序分析:以3月5日为例,应该先把前两个月的加起来,然后再加上5天即本年的第几天,特殊
情况,闰年且输入月份大于3时需考虑多加一天。
2.程序源代码:
'''
year = int(raw_input('year:\n'))
month = int(raw_input('month:\n'))
day = int(raw_...
分类:
编程语言 时间:
2014-05-06 21:27:14
阅读次数:
465
本文首先试验并分析了scanf("%s", buf);的安全性,然后对operator>>(istream&, string&)的实现细节进行分析,最后仿照operator>>用C语言实现了读入长度未知的字符串(字符行)...
分类:
其他好文 时间:
2014-05-06 21:17:37
阅读次数:
596
这是 data.chatFileModelJson = [dic valueForKey:@"Text"];时的数据
{
Content = "s\U5de5\U56fd\U4e2d\U53e5\U53f7\U4e2d\U56fdd";
FileKey = "";
Url = "http://m.im2x.com/d";
}
想要不转码的string j...
分类:
Web程序 时间:
2014-05-06 21:05:26
阅读次数:
384
动态规划法:
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#define PI acos(-1.0)
#define mem(a,b) memset(a,b,sizeof(a))
#...
分类:
其他好文 时间:
2014-05-06 19:49:33
阅读次数:
388
让我们简单Let’s take a look at three (very basic) ways to get a scoped token from Keystone (theOpenStack Identity
Project). Keep in mind that these are just a few ways you can go about this. Before tryin...
分类:
其他好文 时间:
2014-05-06 19:30:32
阅读次数:
359