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: June 2014
Poj Solution 2810
http://poj.org/problem?id=2810 #include <stdio.h> #include <memory.h> #include <vector> #include <string> using namespace std; vector<string> v; int main( ) { double a, b; int i, j; char w[1000], unit[1000]; while( 1 ) { scanf( "%lf %s %lf %1s", &a, unit, &b, w … Continue reading
Posted in poj
Leave a comment
Poj Solution 2800
http://poj.org/problem?id=2800 //* @author: <strong>Yeming Hu</strong>"cslittleye@gmail.com" import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long n,k; while(sc.hasNext()) { n = sc.nextLong(); k = sc.nextLong(); long sum; if(n<=k) { sum = sumMod(k,n); }else { … Continue reading
Posted in poj
Leave a comment
Poj Solution 2799
http://poj.org/problem?id=2799 //* @author: SmilingWang import java.util.*; import java.io.*; public class Main { public static void main(String[] args) throws Exception{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(br.readLine()); IPAddress[] ips = new IPAddress[n]; for(int i = 0; i < … Continue reading
Posted in poj
Leave a comment
Poj Solution 2796
http://poj.org/problem?id=2796 //* @author: 82638882@163.com import java.io.*; public class Main { static int[] b,c; static long[] e,d,p; public static void main(String[] args)throws IOException { InputStreamReader is=new InputStreamReader(System.in); BufferedReader in=new BufferedReader(is); int a=Integer.parseInt(in.readLine()); p=new long[a+2]; b=new int[a+1]; c=new int[a+1]; d=new long[a+1]; e=new … Continue reading
Posted in poj
Leave a comment
Poj Solution 2785
http://poj.org/problem?id=2785 //* @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 s=in.readLine(); int a=Integer.parseInt(s); int[] t1=new int[a]; int[] t2=new int[a]; int[] t3=new int[a]; int[] … Continue reading
Posted in poj
Leave a comment
Poj Solution 2782
http://poj.org/problem?id=2782 //* @author: 82638882@163.com import java.util.*; public class Main { public static void main(String[] args) { Scanner in=new Scanner(System.in); int a=in.nextInt(); int b=in.nextInt(); ArrayList< Integer> t=new ArrayList< Integer>(); while((a–)!=0) t.add(in.nextInt()); Collections.sort(t); int count=0; int u=t.size()-1; int k=0; while(k<=u) { int … Continue reading
Posted in poj
Leave a comment
Poj Solution 2781
http://poj.org/problem?id=2781 #include<stdio.h> #include<string.h> #include<stdlib.h> #include<string.h> #include<math.h> #define INF 3000000 #define NMAX 1000000 int N; typedef struct { int len; int next[101]; }DATA; DATA a[NMAX]; int st,ed; void input() { int i,j; scanf("%d",&N); int tmp; for(i=0;i<N;i++) { scanf("%d%d",&tmp,&a[i].len); for(j=0;j<a[i].len;j++) { scanf("%d",&a[i].next[j]); … Continue reading
Posted in poj
Leave a comment
Poj Solution 2780
http://poj.org/problem?id=2780 //* @author: ccQ.SuperSupper import java.io.*; import java.util.*; class Point implements Comparable { double x,y; public int compareTo(Object obj){ Point temp = (Point) obj; if(temp.x!=this.x){ if(temp.x< this.x) return 1; return -1; } if(temp.y< this.y) return 1; return -1; } } … Continue reading
Posted in poj
Leave a comment
Poj Solution 2777
http://poj.org/problem?id=2777 import java.io.*; import java.util.*; public class Main { static tree[] mytree=new tree[300003]; static boolean[] flag=new boolean[35]; public static void main(String args[]) throws Exception { InputStreamReader is=new InputStreamReader(System.in); BufferedReader in=new BufferedReader(is); String[] ss=in.readLine().split(" "); int l=Integer.parseInt(ss[0]); int t=Integer.parseInt(ss[1]); int o=Integer.parseInt(ss[2]); … Continue reading
Posted in poj
Leave a comment
Poj Solution 2775
http://poj.org/problem?id=2775 #include "stdio.h" struct tree{ int l, r; int v; int ans; int nds; }t[200]; int n, m; int new_node( int value ) { t[m].l = t[m].r = -1; t[m].v = value; t[m].nds = 1; m++; return m-1; } int … Continue reading
Posted in poj
Leave a comment
Poj Solution 2774
http://poj.org/problem?id=2774 #include "stdio.h" #include "memory.h" #include "string.h" #include "stdlib.h" const int CHAR_NUM = 27; const int MAXSIZE = 500000; struct suftree{ suftree *ch[CHAR_NUM]; char *l, *r; int len; suftree *s, *p; }suft[MAXSIZE]; int use_node = 0; /////////////////////////////////////////////// suftree *new_node( ) … Continue reading
Posted in poj
Leave a comment
Poj Solution 2773
http://poj.org/problem?id=2773 //* @author: 82638882@163.com import java.util.*; public class Main { public static void main(String[] args) { Scanner in=new Scanner(System.in); while(in.hasNext()) { int a=in.nextInt(); int b=in.nextInt(); if(a==1)System.out.println(b); else{ ArrayList< Integer> arr=new ArrayList< Integer>(); for(int i=1;i< a;i++) { int m=a,n=i; while(m%n!=0) { … Continue reading
Posted in poj
Leave a comment
Poj Solution 2769
http://poj.org/problem?id=2769 //* @author mekarlos@gmail.com import java.util.Hashtable; import java.util.Scanner; public class Main { public static void main(String[] args) { Hashtable< Integer,Integer> table; Scanner scan=new Scanner(System.in); int M[]=new int[300]; int n=scan.nextInt(),k=0,m=1; boolean band=false; for(int i=0;i< n;i++){ k=scan.nextInt(); band=true; table=new Hashtable< Integer, Integer>(); … Continue reading
Posted in poj
Leave a comment