Codeforces Round #245 (Div. 1)——Guess the Tree

本文出自:http://blog.csdn.net/svitter

实验环境:Myeclipse10 + tomcat7.0

有时间会写windows和linux下的tomcat配置,现在时间有限,暂且不写了。。有些东西也是没有理解透彻。

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%!
String getDate()
{return new java.util.Date().toLocaleString();}
int count = 10;
%>

<html>
  <head>
    <title>一个典型的JSP</title>
  </head>

  <body>
  	<div align="center">
    	<table>
    		<tr bgcolor=777777>
    		<td>------------------------</td></tr>
    		<%
    		int i;
    		String color1="99ccff";
    		String color2="88cc33";
    		for(i = 1; i <= count; i++){
    			String color="";
    			if(i % 2 == 0)
    				color = color1;
    			else
    				color = color2;
    			out.println("<tr bgcolor="+color+"> <td> --- </td> </tr>");
    		}
    		%>
    	</table>
    <hr><P>
   	当前时间是:
   	<%-- 下面是使用表达式的例子 --%>
   	<%=getDate() %></P></div>
  </body>
</html>

运行结果:

Codeforces Round #245 (Div. 1)——Guess the Tree,布布扣,bubuko.com

时间: 2024-10-14 10:55:29

Codeforces Round #245 (Div. 1)——Guess the Tree的相关文章

Codeforces Round #245 (Div. 2)

A Points and Segments (easy) 智商题,(智商捉急~) /*********************************************************** *分析:只要按Xi从小到大染成1010101010... , *1.0间隔的的序列就能保证对于任意区间[l, r]中1的个数和0的个数之差小于等于1. *注意:由于输入的Xi可能是无序的,所有要两次排序处理. *******************************************

Codeforces Round #245 (Div. 1)——Tricky Function

l and dished out an assist in the Blackhawks' 5-3 win over the Nashville Predators.Shaw said just playing with the Blackhawks was enough motivation for him."Positive, I'm playing in the NHL," Shaw said after Sunday's win. "What can't you be

Codeforces Round #245 (Div. 1)——Working out

题目链接 题意: 一个n*m的矩阵,每个方格有一个非负数,现在选择两条线路:一个左上到右下,一个左下到右上,且只能有一个公共点.求两个线路上数的最大值(公共点不算) 分析: 只有两种情况,dp即可.记两个线路为1和2,考虑一个公共点,1为左进右出,2为下进上出:1上进下出,2为左进右出 const int MAXN = 1005; int lu[MAXN][MAXN], ld[MAXN][MAXN]; int ru[MAXN][MAXN], rd[MAXN][MAXN]; int ipt[MAX

Codeforces Round #245 (Div. 1)——Xor-tree

题目链接 题意: 给一棵树n个节点,1为根节点.操作为,选定一个节点x,当前值取反,x的孙子,孙子的孙子...均取反 现在告诉初始时每个点的值和最后每个点的目标值,求操作次数最少时需要选择那些节点 (1?≤?n?≤?105) 分析: 深度浅的点一定是受影响最小的(根节点只受自己的影响),所以从根依次向下递推处理即可 const int MAXN = 110000; VI G[MAXN], ans; int now[MAXN], goal[MAXN]; void dfs(int u, int fa

Codeforces Round #245 (Div. 2) A - Points and Segments (easy)

水到家了 #include <iostream> #include <vector> #include <algorithm> using namespace std; struct Point{ int index, pos; Point(int index_ = 0, int pos_ = 0){ index = index_; pos = pos_; } bool operator < (const Point& a) const{ return p

Codeforces Round #245 (Div. 2) B - Balls Game

暴利搜索即可 #include <iostream> #include <vector> #include <iostream> using namespace std; int main(){ int n,k,x; cin >> n >> k >> x; vector<int> c(n); for(int i = 0 ; i < n; ++ i) cin >> c[i]; int ans = 0; fo

Codeforces Round #225 (Div. 1) C. Propagating tree dfs序+树状数组

C. Propagating tree Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/383/problem/C Description Iahub likes trees very much. Recently he discovered an interesting tree named propagating tree. The tree consists of n nodes numb

Codeforces Round #245 (Div. 1)A. Xor-tree(深搜)

传送门 Description Iahub is very proud of his recent discovery, propagating trees. Right now, he invented a new tree, called xor-tree. After this new revolutionary discovery, he invented a game for kids which uses xor-trees. The game is played on a tree

Codeforces Round #124 (Div. 1) C. Paint Tree(极角排序)

C. Paint Tree time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output You are given a tree with n vertexes and n points on a plane, no three points lie on one straight line. Your task is to paint