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: January 2012
Poj Solution 2035
http://poj.org/problem?id=2035 /* @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 c[][]=new int[11][53],p[]=new int[11],r[]=new int[2],d[]=new int[11],count[]=new int[11]; int casen,i,j,k,pn,top,discard,noanswer; casen=sc.nextInt(); for(k=1;k<=casen;k++) { pn=sc.nextInt(); for(i=0;i< pn;i++){count[i]=c[i][0]=0;p[i]=1;} c[0][0]=52;top=0;noanswer=0;r[0]=r[1]=0; for(i=1;i<=52;i++) c[0][i]=sc.nextInt(); while(top< pn&&c[top][0]!=0) … Continue reading
Posted in poj
Leave a comment
Poj Solution 2033
http://poj.org/problem?id=2033 //* @author: 82638882@163.com import java.io.*; public class Main { public static void main(String[] args) throws IOException { InputStreamReader is=new InputStreamReader(System.in); BufferedReader in=new BufferedReader(is); while(true) { String s=in.readLine(); if(s.equals("0")) break; int l=s.length(); int[] arr=new int[l]; int count=0; for(int i=0;i< l-1;i++) … Continue reading
Posted in poj
Leave a comment
Poj Solution 2031
http://poj.org/problem?id=2031 //* @author: 82638882@163.com import java.io.*; import java.util.Arrays; public class Main { static int[] p; public static void main(String[] args) throws NumberFormatException, IOException { InputStreamReader is=new InputStreamReader(System.in); BufferedReader in=new BufferedReader(is); while(true) { int a=Integer.parseInt(in.readLine()); if(a==0)break; double[][] dd=new double[a][4]; for(int i=0;i< … Continue reading
Posted in poj
Leave a comment
Poj Solution 2029
http://poj.org/problem?id=2029 //* @author: ccQ.SuperSupper import java.io.*; import java.util.*; public class Main { /** * @param args */ static int max(int a,int b) { if(a>b) return a; return b; } public static void main(String[] args) { // TODO Auto-generated method stub … Continue reading
Posted in poj
Leave a comment
Poj Solution 2028
http://poj.org/problem?id=2028 //* @author ������<hongxp11@163.com> import java.awt.Label; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Scanner; import java.util.Set; public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); while (true) { int n = in.nextInt(); int q … Continue reading
Posted in poj
Leave a comment
Poj Solution 2027
http://poj.org/problem?id=2027 import java.util.Scanner; /** * POJ2027 easy * @author NC */ public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); if (scan.hasNext()) { int n = scan.nextInt(); for (int i = 0; i < … Continue reading
Posted in poj
Leave a comment
Poj Solution 2019
http://poj.org/problem?id=2019 //* @author: 82638882@163.com import java.io.*; import java.util.Arrays; public class Main { public static void main(String[] args) throws IOException { InputStreamReader is=new InputStreamReader(System.in); BufferedReader in=new BufferedReader(is); String[] ss=in.readLine().split(" "); int a=Integer.parseInt(ss[0]); int b=Integer.parseInt(ss[1]); int c=Integer.parseInt(ss[2]); int[][] p=new int[a][a]; for(int i=0;i< … Continue reading
Posted in poj
Leave a comment
Poj Solution 2018
http://poj.org/problem?id=2018 //* @author: ccQ.SuperSupper import java.io.*; import java.util.*; public class Main { static int n,k; static final int N = 100000+100,que[] = new int[N]; static double DP[] = new double[N] , sum[] = new double[N]; public static int Get_Num(StreamTokenizer cin) … Continue reading
Posted in poj
Leave a comment
Poj Solution 2017
http://poj.org/problem?id=2017 import java.io.BufferedInputStream; import java.util.Scanner; /** *poj2017 * @author NC */ public class Main { public static void main(String[] args) { Scanner scan = new Scanner(new BufferedInputStream(System.in)); while (scan.hasNext()) { int n = scan.nextInt(); if (n == -1) { break; … Continue reading
Posted in poj
Leave a comment
Poj Solution 2014
http://poj.org/problem?id=2014 //* @author: import java.util.*; public class Main { public static void main(String[] args) { Scanner cin = new Scanner(System.in); int max_width; while((max_width=cin.nextInt())!=0){ int final_width=0; int final_height=0; int remain=max_width; int cur_height=0; int r_width=cin.nextInt(); int r_height=cin.nextInt(); while(r_width!=-1){ if(r_width<=remain){ remain-=r_width; if(final_width< max_width-remain) … Continue reading
Posted in poj
Leave a comment
Poj Solution 2013
http://poj.org/problem?id=2013 //* @author popop0p0popo import java.util.*; import java.io.*; public class Main{ public static void main(String[] args){ Scanner scanner=new Scanner(new BufferedReader(new InputStreamReader(System.in))); int n; String[] s; int index=1; while (true){ n=scanner.nextInt(); if (n==0){ break; } System.out.println("SET "+index); index++; s=new String[n]; for … Continue reading
Posted in poj
Leave a comment