UVALive 4639 - Separate Points

基于MATLAB的太阳能光伏电力仿真,模拟每日太阳能发电,可视化功率曲线,并通过数值积分计算总能量输出。.zip 1.版本:matlab2014a/2019b/2024b 2.附赠案例数据可直接运行。 3.代码特点:参数化编程、参数可方便更改、代码编程思路清晰、注释明细。 4.适用对象:计算机,电子信息工程、数学等专业的大学生课程设计、期末大作业和毕业设计。 立即下载

Time Limit:3000MS     Memory Limit:0KB     64bit IO Format:%lld & %llu

Description

Download as PDF

Numbers of black and white points are placed on a plane. Let's imagine that a straight line of infinite length is drawn on the plane. When the line does not meet any of the points, the line divides these points into two groups. If the division by such a line results in one group consisting only of black points and the other consisting only of white points, we say that the line ``separates black and white points".

Let's see examples in Figure 3. In the leftmost example, you can easily find that the black and white points can be perfectly separated by the dashed line according to their colors. In the remaining three examples, there exists no such straight line that gives such a separation.

\epsfbox{p4639.eps}

Figure 3: Example planes

In this problem, given a set of points with their colors and positions, you are requested to decide whether there exists a straight line that separates black and white points.

Input

The input is a sequence of datasets, each of which is formatted as follows.


n m 
x
1 y1 
... 
xn yn 
xn+1 yn+1 
... 
xn+m yn+m


The first line contains two positive integers separated by a single space; n is the number of black points, and m is the number of white points. They are less than or equal to 100. Then n + m lines representing the coordinates of points follow. Each line contains two integersxi and yi separated by a space, where (xi, yi) represents the x-coordinate and the y-coordinate of the i-th point. The color of the i-th point is black for 1$ \le$i$ \le$n, and is white for n + 1$ \le$i$ \le$n + m.

All the points have integral x- and y-coordinate values between 0 and 10000 inclusive. You can also assume that no two points have the same position.

The end of the input is indicated by a line containing two zeros separated by a space.

Output

For each dataset, output ``YES" if there exists a line satisfying the condition. If not, output ``NO". In either case, print it in one line for each input dataset.

Sample Input

3 3 
100 700
200 200
600 600
500 100
500 300
800 500
3 3 
100 300
400 600
400 100
600 400
500 900
300 300
3 4 
300 300
500 300
400 600
100 100
200 900
500 900
800 100
1 2 
300 300
100 100
500 500
1 1 
100 100
200 100 
2 2 
0 0 
500 700 
1000 1400 
1500 2100 
2 2 
0 0 
1000 1000 
1000 0 
0 1000 
3 3 
0 100 
4999 102 
10000 103 
5001 102 
10000 102 
0 101 
3 3 
100 100 
200 100 
100 200 
0 0 
400 0 
0 400 
3 3 
2813 1640 
2583 2892 
2967 1916 
541 3562 
9298 3686 
7443 7921 
0 0

Sample Output

YES 
NO 
NO 
NO 
YES 
YES 
NO 
NO 
NO 
YES

比赛时,WA了三遍的题。大体思路比较简单,但细节比较纠结,就是在黑点和白点中任意取两点组成一条直线,只要可以将白点和黑点分成两部分则具备一条直线可以将其分成黑白两部分,但当所有点都在一条直线上时需要特殊处理(按x值排序比较黑白临界点大小)。

比赛时的代码(跑了1s多):

#include<iostream>
#include<cstdlib>
#include<cstring>
#include<cstdio>
#include<cmath>
#include<cstdlib>
using namespace std;
struct point
{
    double x, y;
} b[105], w[105];
int cmp(const void *a, const void *b)
{
    point *aa = (point *)a;
    point *bb = (point *)b;
    if(aa->x != bb->x)
        return aa->x > bb->x ? 1 : -1;
    return aa->y > bb->y ? 1 : -1;
}
const double eps = 1e-12;
int main()
{
    int m,n;
    while(cin>>m>>n)
    {
        if(!m&&!n)break;
        for(int i=0; i<m; i++)
            cin>>b[i].x>>b[i].y;
        for(int i=0; i<n; i++)
            cin>>w[i].x>>w[i].y;
        qsort(b, m, sizeof(b[0]), cmp);
        qsort(w, n, sizeof(w[0]), cmp);
        int flag=0, cct, fflag = 0;
        for(int i = 0; i < m; i++) // 先检验黑点
        {
            for(int j =  i + 1; j < m; j++)
            {
                cct = 0;
                int ll = 0, rr = 0, ll2 = 0, rr2 = 0;
                if(!(fabs(b[i].x - b[j].x) < eps))
                {
                    double k = (b[i].y - b[j].y) / (b[i].x - b[j].x);
                    double bb =  b[i].y - k * b[i].x;
                    for(int kk = 0; kk < n; kk++)
                        if(w[kk].y - k * w[kk].x - bb < -eps)
                            ++rr;
                        else if(w[kk].y - k * w[kk].x - bb > eps)
                            ++ll;
                        else if(fabs(w[kk].y - k * w[kk].x - bb) < eps)
                            ++cct;
                    for(int kk = 0; kk < m; kk++)
                        if(kk != i && kk != j)
                        {
                            if(b[kk].y - k * b[kk].x - bb < -eps)
                                ++rr2;
                            else if(b[kk].y - k * b[kk].x - bb > eps)
                                ++ll2;
                            else if(fabs(b[kk].y - k * b[kk].x - bb) < eps)
                                ++cct;
                        }
                }
                else // 注意垂直直线的处理
                {

                    for(int kk = 0; kk < n; kk++)
                        if(w[kk].x < b[j].x)
                            ++rr;
                        else if(w[kk].x > b[j].x)
                            ++ll;

                    for(int kk = 0; kk < m; kk++)
                        if(kk != i && kk != j)
                        {
                            if(b[kk].x < b[j].x)
                                ++rr2;
                            else if(b[kk].x > b[j].x)
                                ++ll2;
                        }
                }
                if(cct == m + n - 2)
                {
                    fflag = 1;
                    break;
                }
                if((ll == n && !ll2) || (rr == n && !rr2))
                {
                    flag = 1;
                    break;
                }
            }
            if(flag)
                break;
        }
        if(!flag && ! fflag) // 检验白点
        {
            for(int i = 0; i < n; i++)
            {
                for(int j =  i + 1; j < n; j++)
                {
                    int ll = 0, rr = 0, ll2 = 0, rr2 = 0;
                    if(!(fabs(w[i].x - w[j].x) < eps))
                    {
                        double k = (w[i].y - w[j].y) / (w[i].x - w[j].x);
                        double bb =  w[i].y - k * w[i].x;
                        for(int kk = 0; kk < m; kk++)
                            if(b[kk].y - k * b[kk].x - bb < -eps)
                                ++rr;
                            else if(b[kk].y - k * b[kk].x - bb > eps)
                                ++ll;
                        for(int kk = 0; kk < n; kk++)
                            if(kk != i && kk != j)
                            {
                                if(w[kk].y - k * w[kk].x - bb < -eps)
                                    ++rr2;
                                else if(w[kk].y - k * w[kk].x - bb > eps)
                                    ++ll2;
                            }
                    }
                    else
                    {

                        for(int kk = 0; kk < m; kk++)
                            if(b[kk].x < w[j].x)
                                ++rr;
                            else if(b[kk].x > w[j].x)
                                ++ll;
                        for(int kk = 0; kk < n; kk++)
                            if(kk != i && kk != j)
                            {
                                if(w[kk].x < w[j].x)
                                    ++rr2;
                                else if(w[kk].x > w[j].x)
                                    ++ll2;
                            }

                    }
                    if((ll == m && !ll2) || (rr == m && !rr2))
                    {

                        flag = 1;
                        break;
                    }
                }
                if(flag)
                    break;
            }
        }
        if(fabs(b[0].x - b[m - 1].x) < eps && fabs(w[0].x - w[n - 1].x) < eps && fabs(b[0].x - w[0].x) < eps) // 所有点在一条垂直直线时,特殊处理
        {
            if(b[m - 1].y < w[0].y || w[n - 1].y < b[0].y)
                flag = 1;
        }
        if(fflag) // 所有点在一条斜线时,特殊处理
        {
            if(b[m - 1].x < w[0].x || w[n - 1].x < b[0].x)
                flag = 1;
        }
        if(flag == 1||(m==1&&n==1))cout<<"YES"<<endl;
        else cout<<"NO"<<endl;
    }
    return 0;
}

比赛完又大体剪了一下枝,时间减到280ms,但代码却已出奇的长了,抽空再建子函数缩一下代码吧,今儿个实在累了。

粗减之后的代码:

#include<iostream>
#include<cstdlib>
#include<cstring>
#include<cstdio>
#include<cmath>
#include<cstdlib>
using namespace std;

struct point
{
    double x, y;
} b[105], w[105];
int cmp(const void *a, const void *b)
{
    point *aa = (point *)a;
    point *bb = (point *)b;
    if(aa->x != bb->x)
        return aa->x > bb->x ? 1 : -1;
    return aa->y > bb->y ? 1 : -1;
}
const double eps = 1e-12;
int main()
{
    freopen("in.txt", "r", stdin);
    int m,n;
    while(cin>>m>>n)
    {
        if(!m&&!n)break;
        for(int i=0; i<m; i++)
            cin>>b[i].x>>b[i].y;
        for(int i=0; i<n; i++)
            cin>>w[i].x>>w[i].y;
        qsort(b, m, sizeof(b[0]), cmp);
        qsort(w, n, sizeof(w[0]), cmp);
        int flag=0, cct, fflag = 0;
        for(int i = 0; i < m; i++)
        {
            for(int j =  i + 1; j < m; j++)
            {
                cct = 0;
                int ll = 0, rr = 0, ll2 = 0, rr2 = 0;
                if(!(fabs(b[i].x - b[j].x) < eps))
                {
                    int flag_l = 0, flag_r = 0;
                    double k = (b[i].y - b[j].y) / (b[i].x - b[j].x);
                    double bb =  b[i].y - k * b[i].x;
                    for(int kk = 0; kk < n; kk++)
                    {
                        if(w[kk].y - k * w[kk].x - bb < -eps)
                        {
                            ++rr;
                            flag_l = 1;
                        }
                        else if(w[kk].y - k * w[kk].x - bb > eps)
                        {
                            ++ll;
                            flag_r = 1;
                        }
                        else if(fabs(w[kk].y - k * w[kk].x - bb) < eps)
                            ++cct;
                        if(flag_l && flag_r)
                            break;
                    }
                    if(flag_l && flag_r) // 加了许多诸如此类的粗剪枝
                        continue;
                    flag_l = 0, flag_r = 0;
                    for(int kk = 0; kk < m; kk++)
                        if(kk != i && kk != j)
                        {
                            if(b[kk].y - k * b[kk].x - bb < -eps)
                            {
                                ++rr2;
                                flag_r = 1;
                            }
                            else if(b[kk].y - k * b[kk].x - bb > eps)
                            {
                                ++ll2;
                                flag_l = 1;
                            }
                            else if(fabs(b[kk].y - k * b[kk].x - bb) < eps)
                                ++cct;
                            if(flag_l && flag_r)
                                break;
                        }
                    if(flag_l && flag_r)
                        continue;
                }
                else
                {
                    int flag_l = 0, flag_r = 0;
                    for(int kk = 0; kk < n; kk++)
                    {
                        if(w[kk].x < b[j].x)
                        {
                            flag_r = 1;
                            ++rr;
                        }
                        else if(w[kk].x > b[j].x)
                        {
                            flag_l = 1;
                            ++ll;
                        }
                        if(flag_l && flag_r)
                            break;
                    }
                    if(flag_l && flag_r)
                        continue;
                    flag_l = 0, flag_r = 0;
                    for(int kk = 0; kk < m; kk++)
                        if(kk != i && kk != j)
                        {
                            if(b[kk].x < b[j].x)
                            {
                                ++rr2;
                                flag_r = 1;
                            }
                            else if(b[kk].x > b[j].x)
                            {
                                ++ll2;
                                flag_l = 1;
                            }
                            if(flag_l && flag_r)
                                break;
                        }
                    if(flag_l && flag_r)
                        continue;
                }
                if(cct == m + n - 2)
                {
                    fflag = 1;
                    break;
                }
                if((ll == n && !ll2) || (rr == n && !rr2))
                {
                    flag = 1;
                    break;
                }
            }

            if(flag)
                break;
        }
        if(!flag && ! fflag)
        {
            for(int i = 0; i < n; i++)
            {
                for(int j =  i + 1; j < n; j++)
                {
                    int ll = 0, rr = 0, ll2 = 0, rr2 = 0;
                    if(!(fabs(w[i].x - w[j].x) < eps))
                    {
                        int flag_l = 0, flag_r = 0;
                        double k = (w[i].y - w[j].y) / (w[i].x - w[j].x);
                        double bb =  w[i].y - k * w[i].x;
                        for(int kk = 0; kk < m; kk++)
                        {
                            if(b[kk].y - k * b[kk].x - bb < -eps)
                            {
                                ++rr;
                                flag_r = 1;
                            }
                            else if(b[kk].y - k * b[kk].x - bb > eps)
                            {
                                ++ll;
                                flag_l = 1;
                            }
                            if(flag_l && flag_r)
                                break;
                        }
                        if(flag_l && flag_r)
                            continue;
                        flag_l = 0, flag_r = 0;
                        for(int kk = 0; kk < n; kk++)
                            if(kk != i && kk != j)
                            {
                                if(w[kk].y - k * w[kk].x - bb < -eps)
                                {
                                    ++rr2;
                                    flag_r = 1;
                                }
                                else if(w[kk].y - k * w[kk].x - bb > eps)
                                {
                                    ++ll2;
                                    flag_l = 1;
                                }
                                if(flag_l && flag_r)
                                    break;
                            }
                        if(flag_l && flag_r)
                            continue;
                    }
                    else
                    {
                        int flag_l = 0, flag_r = 0;
                        for(int kk = 0; kk < m; kk++)
                        {

                            if(b[kk].x < w[j].x)
                            {
                                ++rr;
                                flag_r = 1;
                            }
                            else if(b[kk].x > w[j].x)
                            {
                                ++ll;
                                flag_l = 1;
                            }
                            if(flag_l && flag_r)
                                break;
                        }
                        if(flag_l && flag_r)
                            continue;
                        flag_l = 0, flag_r = 0;
                        for(int kk = 0; kk < n; kk++)
                            if(kk != i && kk != j)
                            {
                                if(w[kk].x < w[j].x)
                                {
                                    ++rr2;
                                    flag_r = 1;
                                }
                                else if(w[kk].x > w[j].x)
                                {
                                    ++ll2;
                                    flag_l = 1;
                                }
                                if(flag_l && flag_r)
                                    break;
                            }
                        if(flag_l && flag_r)
                            continue;

                    }
                    if((ll == m && !ll2) || (rr == m && !rr2))
                    {

                        flag = 1;
                        break;
                    }
                }
                if(flag)
                    break;
            }
        }
        if(fabs(b[0].x - b[m - 1].x) < eps && fabs(w[0].x - w[n - 1].x) < eps && fabs(b[0].x - w[0].x) < eps)
        {
            if(b[m - 1].y < w[0].y || w[n - 1].y < b[0].y)
                flag = 1;
        }
        if(fflag)
        {
            if(b[m - 1].x < w[0].x || w[n - 1].x < b[0].x)
                flag = 1;
        }
        if(flag == 1||(m==1&&n==1))cout<<"YES"<<endl;
        else cout<<"NO"<<endl;
    }
    return 0;
}





【电力负荷预测】项目介绍 MATLAB实现基于BO-Transformer-LSTM贝叶斯优化算法(BO)优化Transformer-LSTM组合模型进行居民用户多步电力负荷预测(含模型描述及部分示例 内容概要:本文介绍了一个基于BO-Transformer-LSTM的组合模型,用于实现居民用户多步电力负荷预测的完整项目实例。该模型融合Transformer的全局注意力机制与LSTM的局部时序记忆能力,构建能够捕捉长时依赖与周期性特征的深度学习架构,并引入贝叶斯优化(BO)自动搜索最优超参数组合,提升预测精度与训练效率。项目涵盖从原始数据清洗、特征工程、滑动窗口样本构建、模型设计到超参数优化、反归一化及多步误差评估的全流程,强调时间顺序划分以防止信息泄露,并通过周期编码、外生变量融合等方式增强数据表达能力。文中提供了详细的MATLAB代码示例,包括数据预处理、网络搭建、贝叶斯优化配置和预测结果评估等关键步骤。 适合人群:具备一定机器学习和时间序列分析基础,熟悉MATLAB编程环境,从事电力系统预测、智能电网、负荷管理等相关领域的研究人员、工程师及研究生。 使用场景及目标:①应用于居民级或多用户聚合负荷的短期至中期多步预测(如未来24小时);②服务于配电系统运行调度、需求响应基线设定、家庭能源管理系统优化、分布式能源协调控制等实际工程场景;③为科研提供可复现的深度学习+贝叶斯优化的技术路线参考。 阅读建议:此资源以实际项目为导向,建议读者结合提供的代码逐步实现并调试模型,重点关注数据质量控制、时间特征编码、组合网络结构设计与贝叶斯优化稳定性之间的协同关系,在实践中深入理解多步预测中的误差累积机制与超参数敏感性问题。 立即下载

相关推荐

国央企创新负责人如何通过平台实现科研成果的快速识别与转化?.docx

科易网基于AI模型+行业大数据,在技术转移、成果转化、技术经纪、知识产权、产业创新、科技招商等垂直领域的多样化应用场景,推出科技创新领域的AI+工具与数智化解决方案,推动科技创新与产业创新智能化发展。

HDU 3699 A hard Aoshu Problem

A hard Aoshu Problem Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 62768/32768 K (Java/Others) Total Submission(s): 345    Accepted Submission(s): 173 Problem Description Math Ol

GooMaple 1841

PotPlayer自用皮肤

自用 PotPlayer 皮肤,仅微调了字体大小与颜色,是按个人习惯调整,未做适配性调整。

UVa 146 - ID Codes

算是简单题吧,实质上就是求比给定字符串稍微大一点的字符串,只要从最后开始依次以最后一个元素为基准,向前与第一个比自身小的元素交换,然后把这个元素后边的元素按增序排列就可以了。 代码如下: #include #include #include #include #include #include using namespace std; int c_cmp(const v

GooMaple 1568

2-shell及常用命令-续.pdf

2-shell及常用命令-续.pdf

Scratch(四十一):升级版垃圾分类

哈喽,大家好!之前给大家展示过“Scratch(二十四):垃圾分类”。今天呢,给大家展示的Scratch是`升级版垃圾分类`。接下来,我们一起看一下效果吧。

我可以很大侠的博客 6867

POJ 3668 Game of Lines

比赛时的一个题,当时没有过,今天一检查竟然是qsort写错了一个数字~~~我那个悔死了,就差那么一点,实际其实就是一个简单的暴力。 代码如下: #include #include #include #include #include using namespace std; int d_cmp(const void *_a,const void *_b) { double *a=

GooMaple 1427

高通thermal-engine.conf配置详解:从虚拟传感器到CPU频率控制的完整指南

本文深入解析了高通thermal-engine.conf配置文件的架构与调优方法。从虚拟传感器的加权融合原理,到监控算法与CPU频率控制的多级策略,提供了完整的配置详解与实战调试指南。文章旨在帮助开发者与高级用户掌握底层温控逻辑,在性能与散热间实现精准平衡,并详细介绍了日志调试与场景化配置等高级技巧。

weixin_28327051的博客 493

ZOJ 1354 Extended Lights Out

Extended Lights Out Time Limit: 2 Seconds      Memory Limit: 65536 KB In an extended version of the game Lights Out , is a puzzle with 5 rows of 6 buttons each (the actual puzzle has 5 rows of 5

GooMaple 1291

继电器管理策略(二)

介绍了电池管理系统中的继电器管理,包含控制和诊断

manjixingkong1234的专栏 419

基于Matlab模拟RANS湍流——详细分析与源代码

在模拟过程中,我们首先定义了模拟所需的参数,包括流体的动力黏度和密度,以及边界条件和网格分辨率。接下来,通过求解平均值方程和湍流涨落方程,我们模拟了湍流的演化过程。在本文中,我们将使用Matlab对RANS湍流进行模拟,并提供相应的源代码。RANS湍流模拟的基本思想是将流场的变量分解为平均值和涨落值,并通过求解平均值方程和湍流涨落方程来描述流场的演化。请注意,以上代码仅为示例,实际的RANS湍流模拟可能需要更复杂的算法和模型。接下来,我们将求解RANS方程,包括平均值方程和湍流涨落方程。

ByteKnight的博客 862

HDU 1218 - Blurred Vision

简单模拟,题意有点难懂,实际就是给你一个 r*c 的矩阵,让你转化为一个(r-1)*(c-1)的矩阵,新矩阵中每个点的值为以其左上角为起点的四节点小矩阵之和的平均值。 代码如下: #include #include int main() { int r, c; char image[10][10], str[10]; while(scanf("%s", str)

GooMaple 1177

SAP 联产品测试

最近领导一直要求研究一下SAP联产品的使用场景,之前只是自己摸索过一次,这个重新对联产品进行一个测试。 1、首先准备好物料主数据 注意主数据中需要勾选联产品标识。 设置好物料的分摊的百分比。 2、检查BOM 在BOM中也需要维护联产品的标识 只有当组件数量未负数时,才能勾选联产品的标识。如果组件数量正值,勾选联产品的标识时会报错。 3、我们创建生产订单 可以看到按正常的生产订单下达时,系统就报错了,问题点在于离散制造的生产订单基本是结算到物料的。但是联产品是按订单结算的, 所以需要对订单类型中的结算参

我小时候很黑的博客 2110

ZOJ 3501 Roman Order

Roman Order Time Limit: 2 Seconds      Memory Limit: 65536 KB Roman numerals are based on seven symbols: I = 1, V = 5, X = 10, L = 50, C = 100, D = 500 and M = 1000. Symbols are iterated to pro

GooMaple 1062

windows中通过docker部署LocateAnything-3B模型

windows中通过docker部署LocateAnything-3B模型

yilvyangguang520的博客 485

手把手教你学Simulink——基于Simulink的无感FOC(滑模观测器+PLL)实战

本文详细介绍了基于Simulink的无感FOC(滑模观测器+PLL)实现方法。主要内容包括:1)SMO+PLL原理精讲,阐述滑模观测器核心思想和PLL的作用;2)系统架构全景图展示;3)Simulink建模全流程,从基础FOC框架到SMO和PLL模块的实现;4)关键参数整定指南和工程实践要点;5)仿真结果分析及常见问题解决方案。该方法可有效替代机械传感器,降低成本并提高可靠性,适用于空调压缩机、电动汽车水泵等工业场景。文章还提供了详细的调试建议和动手实践指导。

MHD0815的博客 83

UVa 270 - Lining Up

先依据横坐标和纵坐标的大小排一下序,然后以两个点为基准,判断一下其他点是否在以这两点为端点的线上,按照点的大小顺序依次扫过所有两个点为基准的线,注意 判断点是否在线上时只判断比其小的点(即:朝一个方向判断,扫过的点便不再判断)~ 代码如下: #include #include #include #include #include using namespace std; stru

GooMaple 960

新能源汽车电池及充电原理详解

本文详细介绍了新能源汽车的电池包结构、铅酸电池充放电原理,以及交流和直流充电的工作原理和优缺点。内容涵盖电池串联并联原因、充电设备如车载充电机、交流充电桩和直流充电桩的介绍,以及不同充电模式的连接方式。通过对充电过程的深入探讨,有助于读者理解新能源汽车的充电技术。

让你爱上电路设计 4525

UVa 10033 - Interpreter

模拟题,关键是题意不太好理解,尤其是8,9两条命令不太好理解。 8da: 表示将地址为“寄存器a的值”的内存单元的值拷贝到寄存器d. 9sa:表示将寄存器s的值拷贝到地址为“寄存器d的值”的内存单元. 代码如下: #include #include #include #include #include using namespace std; int reg[10]; char inter

GooMaple 926

WINCC7.3破解文件

WINCC7.3硬件够破解文件,有需要的下载!WINCC7.3硬件够破解文件,有需要的下载!

老版QQ原生表情gif动态

这是老版的QQ表情,不过全是动态的的,Windows照片查看器是不会动的,可以右击用浏览器打开查看,再说一遍是老版的,只是分享给宁愿用老版也要动态的人。

UVa 10245 - The Closest Pair Problem

看着比较简单,但10000的数据量让我TL了两次,需要进一步优化一下,剪一下枝后,AC了,rank还58,惊喜 ~~ 代码如下: #include #include #include #include #include using namespace std; struct point { double x, y; } po[10000 + 2]; int cmp(cons

GooMaple 852

android 蓝牙通讯demo

android 下蓝牙通讯demo,实现了发现蓝牙,使能蓝牙,通过蓝牙发送消息。

HDU 3650 Hot Expo

Hot Expo Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 886    Accepted Submission(s): 423 Problem Description Sunny wants to go t

GooMaple 818

LinePhone3.2.7(android端最新版本) sip客户端

SIP客户端For android:LinePhone3.2.7(最新版本),官网地址:http://www.linphone.org/

UVa 10132 - File Fragmentation

好久不交题了,而且发现最近状态恶劣的不行,AC率恶心到不行 ~ 这个题代码有点长,但实际思路很简单,qsort 拍一下序,然后,将最长的字符串与最短的字符串搭配,因为一个字符串最多分成两个不同的最长的字符串,所以最长与最短子字符串搭配最多8种情况,枚举出来,其中有一个就是所求的答案。 代码如下: #include #include #include #include usin

GooMaple 739

UVa 10196 - Check The Check

模拟题,代码稍长,一定仔细。 代码如下: #include #include #include #include #include using namespace std; char Map[8][9]; int Hstep_x[8] = {2, 2, -2, -2, 1, 1, -1, -1}; int Hstep_y[8] = {1, -1, 1, -1, 2, -2, 2, -2};

GooMaple 727

URAL 1102 Strange Dialog

一个元素一个元素往后判断,注意inputon和inputone等特殊情况的判断。 用逆序判断会更加简单 。 代码如下: #include #include #include #include #include using namespace std; char a[10000002]; int solve() { int len = strlen(a), flag = 0

GooMaple 719

UVa 10167 - Birthday Cake

暴力,最多一百个点,将所有点带入方程,使得大于零与小于零的个数相同(直线两边点的个数相同)。 刚开始只判断了一边==num ,WA了好几边,换成两边都==num后,AC了 ~~ 代码如下: #include #include #include #include void makeit(int *a, int *b, int num) { int i, j; for(i

GooMaple 593
上一篇: UVa 757 - Gone Fishing
下一篇: UVa 10716 - Evil Straw Warts Live
GooMaple
博客等级 码龄14年 79粉丝 197原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值