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: April 2012
Poj Solution 2137
http://poj.org/problem?id=2137 #include <iostream> #include <cmath> #include <cstdio> using namespace std; int map[2][50][202]; int len[202]; int N; int S; double calc(double x1,double y1,double x2,double y2) { return sqrt((x1 – x2) * (x1 – x2) + (y1 – y2) * (y1 – … Continue reading
Posted in poj
Leave a comment
Poj Solution 2135
http://poj.org/problem?id=2135 #include<iostream> #include"stdio.h" #include"vector" using namespace std; struct edge { int from; int to; int len; int opp; }; vector<edge> e[1010]; int from[1010],dis[1010],n,m; bool sign[1010]; edge *along[1010]; void dijstra() { int i,j,k,to; for(i=0;i<n;i++) { sign[i]=0; dis[i]=999999999; } sign[0]=0; from[0]=-1; dis[0]=0; … Continue reading
Posted in poj
Leave a comment
Poj Solution 2133
http://poj.org/problem?id=2133 #include<iostream> using namespace std; long a[140000],s[140000]; int main() { long i,n,m,j;long result; long begin[200],st,k,ss; char c; while(1) { cin>>m>>n; if(cin.fail())break; long h; h=(1<<16); result=0; for(j=0;j<m;j++) { cin>>c; result*=2; result+=c-‘0’; } for(i=0;i<n;i++) { begin[i]=0; for(j=0;j<m;j++) { cin>>c; begin[i]*=2; begin[i]+=c-‘0’; } … Continue reading
Posted in poj
Leave a comment
Poj Solution 2132
http://poj.org/problem?id=2132 //* @author:alpc12 import java.io.*; import java.util.*; import java.math.*; public class Main { static int N = 26; int n; int M; int[][] adj = new int[26][26]; boolean[] chk = new boolean[26]; boolean DFS(int K, int m) { chk[m] = … Continue reading
Posted in poj
Leave a comment
Poj Solution 2127
http://poj.org/problem?id=2127 /* @author: */ import java.util.*; public class Main { static int ans[][], xf[][], yf[][]; static int as[][], len[]; static public void main( String [] str ) throws Exception{ Scanner cin = new Scanner(System.in); int n = cin.nextInt(), m; int … Continue reading
Posted in poj
Leave a comment
Poj Solution 2126
http://poj.org/problem?id=2126 //* @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=Integer.parseInt(scanner.nextLine()); if (n< 2){ System.out.println("YES"); } else if (n==2){ int a=scanner.nextInt(); int b=scanner.nextInt(); int c=scanner.nextInt(); if (b*b-4*a*c>=0){ System.out.println("NO"); … Continue reading
Posted in poj
Leave a comment
Poj Solution 2121
http://poj.org/problem?id=2121 //* @author: 82638882@163.com import java.io.*; import java.util.*; public class Main { static String[] Num=new String[]{ "zero","one","two","three","four","five","six","seven","eight","nine","ten", "eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen", "nineteen","twenty","thirty","forty","fifty","sixty","seventy","eighty","ninety", "hundred","thousand","million" }; public static void main(String[] args) throws IOException { InputStreamReader is=new InputStreamReader(System.in); BufferedReader in=new BufferedReader(is); String s; while(true) { s=in.readLine(); … Continue reading
Posted in poj
Leave a comment
Poj Solution 2114
http://poj.org/problem?id=2114 #include <vector> #include <stdio.h> #include <algorithm> using namespace std; typedef pair< int, int > edge; vector< edge > e[10010]; int v[10010],s[10010]; int st[10010],sn; bool sign[10010]; int n; int find_root_search( int r, int f ) { int temp,i,j; v[r] = … Continue reading
Posted in poj
Leave a comment
Poj Solution 2112
http://poj.org/problem?id=2112 #include<iostream> using namespace std; #define null 0 const int size=1010; long dis[size][size],k,m,c,up,w[size][size]; int maxmatch(int n,int m,long w[][size],int *p) { int p_n[size]; int p_m[size]; bool sign[size]; int q[size],from[size],s,t; int i,j,link,now,h; for(i=0;i<n;i++)p_n[i]=-1; for(j=0;j<m;j++)p_m[j]=-1; for(i=0;i<n;i++) if(p_n[i]==-1) { for(j=0;j<m;j++)sign[j]=0; s=1;link=-1; from[0]=-1; q[0]=size-1; p_m[size-1]=i; … Continue reading
Posted in poj
Leave a comment
Poj Solution 2109
http://poj.org/problem?id=2109 import java.math.BigInteger; import java.util.Scanner; public class Main { static final BigInteger TWO = new BigInteger("2"); static final BigInteger ONE = BigInteger.ONE; public static void main(String[] args) { Scanner in = new Scanner(System.in); // k^n=p findK; BigInteger p; int n; … Continue reading
Posted in poj
Leave a comment
Poj Solution 2105
http://poj.org/problem?id=2105 import java.util.*; public class Main { public static void main(String[] args) { Scanner cin = new Scanner(System.in); int num = Integer.valueOf(cin.nextLine()).intValue(); for(int i = 0; i < num; i++) { String str, temp; int a,b,c,d = 0; StringBuffer sb … Continue reading
Posted in poj
Leave a comment
Poj Solution 2104
http://poj.org/problem?id=2104 //* @author: 82638882@163.com import java.io.*; import java.util.Arrays; 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 k=Integer.parseInt(ss[1]); my[] p=new my[a]; ss=in.readLine().split(" "); for(int i=0;i< a;i++) … Continue reading
Posted in poj
Leave a comment
Poj Solution 2103
http://poj.org/problem?id=2103 //* @author: import java.math.BigInteger; import java.util.Scanner; public class Main { static int oneNum[] = new int[65536]; static BigInteger arr[] = new BigInteger[20]; static int n; static BigInteger list[] = new BigInteger[65536]; public static void main(String[] args) { for(int i … Continue reading
Posted in poj
Leave a comment