2011年8月4日

1566: 碰撞检测 contest 4

摘要: 1566: 碰撞检测Time Limit: 1 SecMemory Limit: 128 MBSubmit: 52Solved: 11[Submit][Status][Web Board]Description小毛在做计算几何题时,遇到一个问题:在3D空间里有一个球体和一个长方体,判断它们是否会发生碰撞(collision)。小毛想了半天都没想出来,只有靠你去解决它了。Input第一行一个整数T,表示案例数。每个案例两行,第一行24个整数,分别为X1,Y1,Z1,X2,Y2,Z2...X8,Y8,Z8,表示一个长方体的8个顶点的空间位置,(注意:输入保证每个长方体的各边平行于坐标轴)。第二行4 阅读全文

posted @ 2011-08-04 11:04 more think, more gains 阅读(199) 评论(0) 推荐(0) 编辑

strange lift contest4 简单bfs

摘要: #include <stdio.h>#include <deque>#include <string.h>using namespace std; deque<int>q;int dp[4000000];int floor[110000];int visit[1100]; int main( ){ int N, i, t, v,s ,e, flag; while (scanf("%d",&N), N){ flag = 0; q.clear(); scanf("%d%d",&s,&e) 阅读全文

posted @ 2011-08-04 07:45 more think, more gains 阅读(151) 评论(0) 推荐(0) 编辑

组合问题 contest4

摘要: 1574: 组合问题Time Limit: 1 SecMemory Limit: 128 MBSubmit: 78Solved: 23[Submit][Status][Web Board]Description有n 种颜色的球,每种颜色的球的个数有任意多个,从中取m个,问有多少种取法Input每行2个正整数 n,m(<=31) ,n=0,m=0结束. Output输出有多少种取法Sample Input2 23 30 0Sample Output310#include<stdio.h>long long m1[40],m2[40],n,m;void gf( ){ for( l 阅读全文

posted @ 2011-08-04 07:43 more think, more gains 阅读(154) 评论(0) 推荐(0) 编辑

Game contest4

摘要: 1569: GameTime Limit: 8 SecMemory Limit: 128 MBSubmit: 57Solved: 16[Submit][Status][Web Board]DescriptionTic-tac-toe is the third most popular activity to kill a lazy afternoon in Ardenia (right after solving puzzles and insulting your neighbors). Arthum and Breece are not fans of this game, but the 阅读全文

posted @ 2011-08-04 07:42 more think, more gains 阅读(351) 评论(0) 推荐(0) 编辑

Math one poj 3372 contest4

摘要: #include <iostream> #include <cstdio> using namespace std; int main() { int n; while(scanf("%d", &n)!= EOF) { if (!(n&(n-1))) { printf("YES\n"); } else printf("NO\n"); } } 证明:http://www.cnblogs.com/Saatgut/archive/2008/10/09/1307405.html 阅读全文

posted @ 2011-08-04 07:21 more think, more gains 阅读(156) 评论(0) 推荐(0) 编辑

约瑟夫环 循环链表 contest 4

摘要: 1573: Math twoTime Limit: 1 SecMemory Limit: 128 MBSubmit: 71Solved: 27[Submit][Status][Web Board]Description有N个小孩围成一圈,给他们从1开始依次编号,现指定从第W个开始报数,报到第S个时,该小孩出列,然后从下一个小孩开始报数,仍是报到S个出列,如此重复下去,直到所有的小孩都出列(总人数不足S个时将循环报数),求小孩出列的顺序。Input第一行输入小孩的人数N(N<=64)接下来每行输入一个小孩的名字(人名不超过15个字符)最后一行输入W,S (W < N),用逗号&quo 阅读全文

posted @ 2011-08-04 07:03 more think, more gains 阅读(167) 评论(0) 推荐(0) 编辑

平方数 contest 4

摘要: 1565: 平方数Time Limit: 1 SecMemory Limit: 128 MBSubmit: 22Solved: 13[Submit][Status][Web Board]Description定义一类整数叫K-Omitted-Square-Number(K-OSN),如果数N是K-OSN必须满足下列条件:(1) 它是一个完全平方数。(2) 它的最末一位不为零。(3) 它不小于10的K次方。(4) 它的最后K位被截去后,所得的结果仍旧是一个完全平方数。现在给你一个正偶数K,求它的最大K-OSN。Input有多个案例。第一行为T(T<=20),是案例数,每个案例(一行)都只有 阅读全文

posted @ 2011-08-04 00:16 more think, more gains 阅读(185) 评论(0) 推荐(0) 编辑

What Are You Talking About

摘要: What Are You Talking AboutTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 102400/204800 K (Java/Others)Total Submission(s): 4522Accepted Submission(s): 1366Problem DescriptionIgnatius is so lucky that he met a Martian yesterday. But he didn't know the language the Martians use. The Martian 阅读全文

posted @ 2011-08-04 00:05 more think, more gains 阅读(278) 评论(0) 推荐(0) 编辑

导航