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 2012
Poj Solution 2075
http://poj.org/problem?id=2075 //* @author: SmilingWang import java.util.*; public class Main { public static final int BLOCK = Integer.MAX_VALUE; public static final double zero = 1e-6; public static double cl; public static void main(String[] args){ Scanner in = new Scanner(System.in); cl = … Continue reading
Posted in poj
Leave a comment
Poj Solution 2070
http://poj.org/problem?id=2070 //* @author: 82638882@163.com import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner in=new Scanner(System.in); while(in.hasNext()) { float a=in.nextFloat(); float b=in.nextFloat(); float c=in.nextFloat(); if(a==0&&b==0&&c==0) break; boolean s=true; if(a<=4.5&&b>=150&&c>=200){ System.out.print("Wide Receiver "); s=false; } if(a<=6&&b>=300&&c>=500){ System.out.print("Lineman "); … Continue reading
Posted in poj
Leave a comment
Poj Solution 2069
http://poj.org/problem?id=2069 #include<iostream> #include"stdio.h" #include"math.h" using namespace std; #define sq(a) ((a.x)*(a.x)+(a.y)*(a.y)+(a.z)*(a.z)) int n; typedef double det[3][3]; struct point { double x,y,z; }; double hls(det a) { return a[0][0]*a[1][1]*a[2][2]+a[0][1]*a[1][2]*a[2][0]+a[0][2]*a[1][0]*a[2][1] -a[0][2]*a[1][1]*a[2][0]-a[0][1]*a[1][0]*a[2][2]-a[0][0]*a[1][2]*a[2][1]; } bool qiujie(det s,double s0,double s1,double s2,point &o) { det t={{s0,s[0][1],s[0][2]},{s1,s[1][1],s[1][2]},{s2,s[2][1],s[2][2]}}; double … Continue reading
Posted in poj
Leave a comment
Poj Solution 2064
http://poj.org/problem?id=2064 //* @author:alpc12 import java.io.*; import java.util.*; class Layer { int cost; int frontier[]; int frontierCode; Layer(int f[], int c) { cost = c; frontier = new int[f.length]; frontierCode = 0; for (int i=0; i< frontier.length; i++) frontier[i] = f[i]; … Continue reading
Posted in poj
Leave a comment
Poj Solution 2061
http://poj.org/problem?id=2061 //* @author:alpc12 /* Sample solution to D – Pseudo random numbers / Mikael Goldmann * First count backwards to recreate the seed number * The count forwards to get T:th number. Try using few columns to * save space. … Continue reading
Posted in poj
Leave a comment
Poj Solution 2060
http://poj.org/problem?id=2060 #include <memory.h> #include <stdio.h> #include <math.h> #define null 0 #define y1 yy1 const int size = 510; //size must be bigger than n and m. //nС��mʱЧ�ʸ� int maxmatch( int n, int m, bool w[][size], int *p) { int p_n[size]; … Continue reading
Posted in poj
Leave a comment
Poj Solution 2054
http://poj.org/problem?id=2054 #include <stdio.h> #include <vector> #include <set> using namespace std; struct node { int id; int num; int cost; int sigma_c; node *father; vector <node *> child; bool colored; }t[1000]; struct cmp { bool operator()( node *a, node *b )const … Continue reading
Posted in poj
Leave a comment
Poj Solution 2051
http://poj.org/problem?id=2051 import java.util.Scanner; public class Main { private static Query[] query = new Query[1002]; public static void main(String[] args) { Scanner sc = new Scanner(System.in); int i = 0; while (sc.hasNext()) { String s = sc.nextLine(); if (s.equals("#")) { int … Continue reading
Posted in poj
Leave a comment
Poj Solution 2049
http://poj.org/problem?id=2049 #include<stdio.h> #include<string.h> #include<stdlib.h> #include<string.h> #include<math.h> #define INF 30000 #define NMAX 201 int a[NMAX][NMAX]; int map[NMAX][NMAX][4]; int yp[4]={1,0,-1,0},xp[4]={0,1,0,-1}; int M,N; int x,y,d,t; void init() { for(int i=0;i<=200;i++) { map[0][i][2]=-1; map[200][i][0]=-1; map[i][0][3]=-1; map[i][200][1]=-1; } } typedef struct { int y,x; }DATA; … Continue reading
Posted in poj
Leave a comment
Poj Solution 2042
http://poj.org/problem?id=2042 /* @author: */ import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n, s, t1, t2, t; while( sc.hasNext() ) { n=sc.nextInt(); if( n == 0 ) break; s = … Continue reading
Posted in poj
Leave a comment
Poj Solution 2039
http://poj.org/problem?id=2039 import java.util.*; public class Main { public static void main(String[] args) { Scanner cin = new Scanner(System.in); int num = 0; String str; char[][] array; while(true) { num = Integer.valueOf(cin.nextLine()).intValue(); if(num == 0) break; else { str = cin.nextLine(); … Continue reading
Posted in poj
Leave a comment