摘要:
来源:http://acm.fzu.edu.cn/problem.php?pid=1402题意:中文~思路:就是中国剩余定理的模板题,本来是做poj上的一道题,那道题没要求两辆不互质,还要转化成两辆互质的,还不会,,,先把这道题水过了。。代码:#include <iostream>
#include <cstdio>
#include <string.h>
using namespace std; #define CLR(arr,val) memset(arr,val,sizeof(arr))
const int N = 1010;
long long a[ 阅读全文
阅读排行榜
Java经典线程同步问题------生产者与消费者
2012-07-26 19:38 by javaspring, 255 阅读, 收藏,
摘要:
先上代码class Test
{ public static void main(String []args) { Queue q=new Queue(); Producer p=new Producer(q); Consumer c=new Consumer(q); p.start(); c.start(); }
} class Producer extends Thread
{ Queue q; Producer(Queue q) { this.q=q; } public void run() { for(int i=0;i<10;i++)
... 阅读全文
2012/5/26日志
2012-05-26 16:57 by javaspring, 255 阅读, 收藏,
摘要:
1 想在winform中显示map及各种操作等: 方法一: 可以在winform上使用webBrowser的,然后webBrowser的url属性指向本地的某一个你需要的.html文件. 方法二: 可以在winform上使用webBrowser的,然后设置url的属性指向“http://.....”. 但是对于第一种方法而言,绝对地址很容易造成麻烦,解决的方案: string address=System.AppDomain.CurrentDomain.BaseDirectory+"baidumap.html"; this.webBrowser1.Url = new Sys 阅读全文
图论500题
2012-08-13 11:55 by javaspring, 253 阅读, 收藏,
摘要:
=============================以下是最小生成树+并查集======================================
【HDU】
1213 How Many Tables 基础并查集★
1272 小希的迷宫 基础并查集★
1325&&poj1308 Is It A Tree? 基础并查集★
1856 More is better 基础并查集★
1102 Constructing Roads 基础最小生成树★
1232 畅通工程 基础并查集★
1233 还是畅通工程 基础最小生成树★
1863 畅通... 阅读全文
3087_Shuffle'm Up
2012-03-09 23:09 by javaspring, 253 阅读, 收藏,
摘要:
DescriptionA common pastime for poker players at a poker table is to shuffle stacks of chips. Shuffling chips is performed by starting with two stacks of poker chips,S1andS2, each stack containingCchips. Each stack may contain chips of several different colors.The actual shuffle operation is perform 阅读全文
浙公网安备 33010602011771号