Meta
-
Recent Posts
Recent Comments
Archives
- May 2024
- April 2023
- February 2023
- January 2023
- December 2022
- November 2022
- September 2022
- June 2022
- July 2021
- January 2021
- February 2020
- September 2019
- March 2018
- February 2018
- August 2016
- July 2016
- June 2016
- May 2016
- April 2016
- March 2016
- February 2016
- January 2016
- December 2015
- November 2015
- October 2015
- September 2015
- August 2015
- July 2015
- June 2015
- May 2015
- April 2015
- March 2015
- February 2015
- January 2015
- December 2014
- November 2014
- October 2014
- September 2014
- August 2014
- July 2014
- June 2014
- May 2014
- April 2014
- March 2014
- February 2014
- January 2014
- December 2013
- November 2013
- October 2013
- September 2013
- August 2013
- July 2013
- June 2013
- May 2013
- April 2013
- March 2013
- February 2013
- January 2013
- December 2012
- November 2012
- October 2012
- September 2012
- August 2012
- July 2012
- June 2012
- May 2012
- April 2012
- March 2012
- February 2012
- January 2012
- December 2011
- November 2011
- October 2011
- September 2011
- August 2011
- July 2011
- June 2011
- May 2011
- April 2011
- March 2011
- February 2011
- January 2011
- December 2010
- November 2010
- October 2010
- September 2010
- August 2010
- July 2010
- June 2010
- May 2010
- April 2010
- March 2010
- February 2010
- January 2010
- December 2009
- November 2009
- October 2009
- September 2009
- August 2009
- July 2009
- June 2009
- May 2009
- April 2009
- March 2009
- February 2009
Categories
Monthly Archives: February 2016
Poj Solution 3516
http://poj.org/problem?id=3516 //* @author: ccQ.SuperSupper import java.io.*; import java.util.*; class Queue{ int pre; int cnt_posi; int cnt_num; int cnt_sum; void set(int pre_t,int cnt_num_t,int cnt_sum_t,int cnt_posi_t){ this.pre = pre_t; this.cnt_num = cnt_num_t; this.cnt_sum = cnt_sum_t; this.cnt_posi = cnt_posi_t; } } class node{ … Continue reading
Posted in poj
Leave a comment
Poj Solution 3512
http://poj.org/problem?id=3512 //* @author: 82638882@163.com import java.io.*; import java.util.*; public class Main { public static void main(String[] args) throws IOException { InputStreamReader is=new InputStreamReader(System.in); BufferedReader in=new BufferedReader(is); String[] ss; String s; int count=0; while(true) { count++; node[] arr=new node[1001]; node[] pp=new … Continue reading
Posted in poj
Leave a comment
Poj Solution 3511
http://poj.org/problem?id=3511 //* @author mekarlos@gmail.com import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.StringTokenizer; public class Main { public static void main(String args[]) throws IOException{ BufferedReader stdin=new BufferedReader(new InputStreamReader(System.in)); StringTokenizer tokens; int[] prims=new int[1000001]; int[] ferms=new int[1000001]; for(int i=3;i< 1000000;i+=2) prims[i]=1; prims[2]=1; … Continue reading
Posted in poj
Leave a comment
Poj Solution 3510
http://poj.org/problem?id=3510 //* @author: 82638882@163.com import java.util.*; public class Main { public static void main(String[] args) { Scanner in=new Scanner(System.in); while(true) { String s=in.nextLine(); StringBuffer sb=new StringBuffer(""); int l=s.length(); boolean bb=false; for(int i=0;i< l;i++) { char c=s.charAt(i); if(i< l-1&&c==’d’&&s.charAt(i+1)==’d’){ sb.append(‘p’); i++; … Continue reading
Posted in poj
Leave a comment
Poj Solution 3508
http://poj.org/problem?id=3508 import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws IOException { BufferedReader read = new BufferedReader(new InputStreamReader( System.in)); int num = 1; int flg, tt, last; while (true) { char[] c = … Continue reading
Posted in poj
Leave a comment
Poj Solution 3507
http://poj.org/problem?id=3507 import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); float[] input = new float[6]; while(true) { input[0] = in.nextFloat(); float max = input[0]; float min = input[0]; float sum = input[0]; … Continue reading
Posted in poj
Leave a comment
Poj Solution 3505
http://poj.org/problem?id=3505 //* @author: import java.util.Scanner; import java.util.Arrays; public class Main{ public static void main(String args[]){ Scanner sc=new Scanner(System.in); int nn,n,m,ans; nn=sc.nextInt(); while((nn–)!=0) { n=sc.nextInt(); m=sc.nextInt(); int a[][]=new int[n+1][m+1]; ans=0; for (int i=1;i<=n;i++) { for (int j=1;j<=m;j++) a[i][j]=sc.nextInt(); int tp=0,now=1,t1,t2; for … Continue reading
Posted in poj
Leave a comment
Poj Solution 3504
http://poj.org/problem?id=3504 //* @author:alpc12 import java.util.*; public class Main { public static Scanner in=new Scanner(System.in).useLocale(Locale.US); public void run() { boolean[] singles=new boolean[26]; Map< String,String>[][] words=new Map[26][26]; for(int i=0;i< 26;++i) for(int j=0;j< 26;++j) words[i][j]=new HashMap< String,String>(); Set< String>[][] doublewords=new Set[26][26]; for(int i=0;i< … Continue reading
Posted in poj
Leave a comment
Poj Solution 3488
http://poj.org/problem?id=3488 //* @author: import java.util.*; import java.math.*; import java.io.FileReader; public class Main { public static void main(String[] args) throws Exception{ Scanner in=new Scanner(System.in); while (true) { int n; try { n=in.nextInt(); } catch(Exception e) {return;} String []s=new String [n]; for … Continue reading
Posted in poj
Leave a comment
Poj Solution 3486
http://poj.org/problem?id=3486 /* @author: */ import java.util.Scanner; import java.util.Arrays; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n,c; int m[][]=new int[1003][1003]; int f[]=new int[1003]; while(sc.hasNext()){ c=sc.nextInt(); n=sc.nextInt(); for(int i=0;i< m.length;i++) Arrays.fill( m[i],0); for(int … Continue reading
Posted in poj
Leave a comment
Poj Solution 3485
http://poj.org/problem?id=3485 //* @author: import java.util.*; import java.math.*; import java.io.FileReader; class SEG implements Comparable<SEG> { double b,e; SEG(double x,double y) { b=x;e=y; } public int compareTo(SEG other) { if (b< other.b) return -1; else if (b==other.b) { if (e< other.e) return … Continue reading
Posted in poj
Leave a comment
Poj Solution 3484
http://poj.org/problem?id=3484 //* @author: import java.util.*; import java.math.*; import java.io.FileReader; class node{ int x,y,z; node(String s) { int t=0,cnt=0; for (int i=0;i<=s.length();i++) { if (i!=s.length()&&s.charAt(i)>=’0’&&s.charAt(i)<=’9′) { t=t*10+s.charAt(i)-‘0’; } else { if (cnt==0) x=t; else if (cnt==1) y=t; else if (cnt==2) z=t; … Continue reading
Posted in poj
Leave a comment