自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(9)
  • 收藏
  • 关注

原创 4个数和为0

#include #include #include #include using namespace std; int N; int a[2000]; struct Node{ int x; int y; long long sum; }site[1000100]; //数组开大。。不然时间超限 bool cmp(const Node &a,const Node &b){ r

2017-06-30 18:53:05 363

原创 只包含因子2 3 5的数 51nod1010

#include using namespace std; const long long maxn = 1e18+888; long long a[100000]; int T; long long N; long long mx = maxn; int z = 0; void binarySearch(){ int left = 1,right = z-1; while

2017-06-30 15:54:14 573

原创 和为k的连续区间(mp+前缀和) 51nod1094

#include using namespace std; const int MAX_VALUE = 1e4+5; int n,k; mapmp; long long a[MAX_VALUE]; long long s[MAX_VALUE]; int main(){ scanf("%d%d",&n,&k); memset(s,0,sizeof(s)); for(int i=1;

2017-06-30 13:28:30 560

原创 java AWT监听器之简单计算模型

//重点://1.如何实现将数字输入框的文本 引用并转换成 数字类型 相加减 (下面使用两种方法)//2.监听等号import java.awt.*; import java.awt.event.*; public class TFMath{ public static void main(String[] args){ new FFrame().launchFrame(); } }

2017-06-17 20:46:01 316

原创 JAVA UDP

Longlei'xingimport java.net.*; import java.io.*; public class TestUDPServer{ public static void main(String[] args) throws Exception{ byte buf[] = new byte[1024]; DatagramPacket dp = new Datagram

2017-06-17 11:41:23 222

原创 JAVA UDP

Long类型数的收发。import java.net.*; import java.io.*; public class TestUDPServer{ public static void main(String[] args) throws Exception{ byte buf[] = new byte[1024]; DatagramPacket dp = new DatagramP

2017-06-17 11:40:51 214

原创 JAVA Producer and Consumer

public class ProducerConsumer{ public static void main(String[] args){ SyncStack ss = new SyncStack(); Producer p = new Producer(ss); Consumer c = new Consumer(ss); new Thread(p).start(); n

2017-06-15 17:04:45 374

原创 JAVA synchronized

JAVA 关于synchronized的一些辅助理解程序:public class Test1 implements Runnable{ int b = 100; public synchronized void m1() throws Exception{ b = 1000; Thread.sleep(5000); System.out.println("b = " + b);

2017-06-15 15:27:11 306

原创 Java DeadLock

public class TestDeadLock implements Runnable{ public int flag = 1; static Object o1 = new Object(),o2 = new Object(); public void run(){ System.out.println("flag = "+flag); if(flag==1){ syn

2017-06-15 11:38:26 694

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除