Meta
-
Recent Posts
Recent Comments
- MorrissMar on 隆宪叁年-五一
- tEVFSJtRNq on A man in his twenties (in hex)
- MorrissMar on 隆宪叁年-五一
- ZEzPRbkFJG on A man in his twenties (in hex)
- MorrissMar on 隆宪叁年-五一
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: November 2015
Poj Solution 3366
http://poj.org/problem?id=3366 //* @author: 82638882@163.com import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner in=new Scanner(System.in); int a=in.nextInt(); int b=in.nextInt(); String[] s1=new String[a]; String[] s2=new String[a]; for(int i=0;i< a;i++) { s1[i]=in.next(); s2[i]=in.next(); } for(int i=0;i< b;i++) { … Continue reading
Posted in poj
Leave a comment
Poj Solution 3365
http://poj.org/problem?id=3365 /* @author: */ //����һ�ų�ΪH��Ϊw��ֽ��Ҫ����һ���������Բ����ʹ����Բ�İ뾶���� //���}�����һ����wΪ����Բ���ܳ���һ����H-2RΪ����Բ���ܳ���Ȼ��ȡ���ֵ�ͺ��� import java.util.Scanner; import java.util.Arrays; public class Main{ static double pi=Math.PI; static double epx=1e-6; public static void main(String args[]){ Scanner sc=new Scanner(System.in); double w,h,v1,v2,temp,r,d; while(sc.hasNext()){ w=sc.nextDouble(); h=sc.nextDouble(); if(w==0&&h==0) break; if(h>w){temp=h;h=w;w=temp;} v1=h*h*(w-h/pi)/(4.0*pi); d=w/(pi+1); if(d>h+epx){/*�ж�d�Ƿ������*/ r=h/2.0; v2=pi*r*r*h; … Continue reading
Posted in poj
Leave a comment
Poj Solution 3364
http://poj.org/problem?id=3364 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,m,c; while(sc.hasNext()){ n=sc.nextInt(); if(n==0) break; m=sc.nextInt(); c=sc.nextInt(); int t=(m-7)*(n-7); int t1=(t+1)/2; if (c==0) System.out.printf("%dn",t-t1); else System.out.printf("%dn",t1); } } }
Posted in poj
Leave a comment
Poj Solution 3356
http://poj.org/problem?id=3356 import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.StringTokenizer; public class Main{ public static void main(String[] args) throws Exception{ BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); String str ; while((str=in.readLine())!=null){ StringTokenizer toke1 = new StringTokenizer(str); StringTokenizer toke2 = new StringTokenizer(in.readLine()); int m = … Continue reading
Posted in poj
Leave a comment
Poj Solution 3352
http://poj.org/problem?id=3352 //* @author: 82638882@163.com import java.io.*; public class Main { static int a,cnt=1; static int[] rank,un; static boolean[][] map; public static void main(String[] args) throws NumberFormatException, IOException { InputStreamReader is=new InputStreamReader(System.in); BufferedReader in=new BufferedReader(is); String[] ss=in.readLine().split(" "); a=Integer.parseInt(ss[0]); map=new boolean[a+1][a+1]; … Continue reading
Posted in poj
Leave a comment
Poj Solution 3349
http://poj.org/problem?id=3349 //* @author: import java.util.StringTokenizer; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; class Node { int index; Node next; } public class Main { static BufferedReader cin = new BufferedReader(new InputStreamReader(System.in)); final int N=9997; int [][]snow=new int[100010][6]; boolean check(int s1,int s2) … Continue reading
Posted in poj
Leave a comment
Poj Solution 3340
http://poj.org/problem?id=3340 //* @author ������<hongxp11@163.com> import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { /** * @param args * @throws IOException */ public static int count(String a, String b) { int len = a.length(); int result = 1; for (int … Continue reading
Posted in poj
Leave a comment
Poj Solution 3332
http://poj.org/problem?id=3332 import java.util.regex.*;import java.util.*; public class Main { public static void main(String[] args){ String str; int n; Scanner cin = new Scanner(System.in); n=cin.nextInt(); str=cin.nextLine(); Pattern pattern = Pattern.compile("(\s)*(\+|\-)?(\d)+(\.(\d)+)?((e|E)(\+|\-)?(\d)+)?"); int i; for(i=0;i< n;++i){ str=cin.nextLine(); Matcher matcher = pattern.matcher(str); if(matcher.matches()){ System.out.println("LEGAL"); } … Continue reading
Posted in poj
Leave a comment
Poj Solution 3331
http://poj.org/problem?id=3331 import java.io.BufferedInputStream; import java.math.BigDecimal; import java.util.Scanner; /** * * poj3331 * @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(); for (int … Continue reading
Posted in poj
Leave a comment
Poj Solution 3325
http://poj.org/problem?id=3325 import java.util.*; import java.text.*; public class Main { public static void main(String[] args) { Scanner cin = new Scanner(System.in); while(true) { int num = cin.nextInt(); if(num == 0) break; int[] list = new int[num]; int max = 0; int … Continue reading
Posted in poj
Leave a comment
Poj Solution 3324
http://poj.org/problem?id=3324 //* @author: ccQ.SuperSupper import java.io.*; import java.util.*; import java.math.*; public class Main { public static void main(String args[]) throws Exception { Scanner cin=new Scanner(System.in); BigInteger s,M; int p,i; while(cin.hasNext()) { p=cin.nextInt(); s=BigInteger.valueOf(4); M=BigInteger.ONE; M=M.shiftLeft(p).subtract(BigInteger.ONE); for(i=0;i< p-2;++i) { s=s.multiply(s).subtract(BigInteger.valueOf(2)); while(s.bitLength()>p) … Continue reading
Posted in poj
Leave a comment