• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
T Y
博客园    首页    新随笔    联系   管理    订阅  订阅
上一页 1 2 3 4
2013年7月29日
4 Values whose Sum is 0
摘要: DescriptionThe SUM problem can be formulated as follows: given four lists A, B, C, D of integer values, compute how many quadruplet (a, b, c, d ) ∈ A x B x C x D are such that a + b + c + d = 0 . In the following, we assume that all lists have the same size n .InputThe first line of the input file c 阅读全文
posted @ 2013-07-29 11:12 T天天T 阅读(282) 评论(0) 推荐(0)
Expanding Rods
摘要: When a thin rod of length L is heated n degrees, it expands to a new length L'=(1+n*C)*L, where C is the coefficient of heat expansion.When a thin rod is mounted on two solid walls and then heated, it expands and takes the shape of a circular segment, the original rod being the chord of the segm 阅读全文
posted @ 2013-07-29 09:41 T天天T 阅读(189) 评论(0) 推荐(0)
2013年7月27日
Radar Installation
摘要: DescriptionAssume the coasting is an infinite straight line. Land is in one side of coasting, sea in the other. Each small island is a point locating in the sea side. And any radar installation, locating on the coasting, can only cover d distance, so an island in the sea can be covered by a radius i 阅读全文
posted @ 2013-07-27 17:00 T天天T 阅读(211) 评论(0) 推荐(0)
2013年7月25日
poj 2183 Bovine Math Geniuses
摘要: DescriptionFarmer John loves to help the cows further their mathematical skills. He has promised them Hay-flavored ice cream if they can solve various mathematical problems.He said to Bessie, "Choose a six digit integer, and tell me what it is. Then extract the middle four digits. Square them a 阅读全文
posted @ 2013-07-25 10:42 T天天T 阅读(276) 评论(0) 推荐(0)
Programmer, Rank Thyself
摘要: 虽然没有A过去,但是自己学会了结构体的排序与运用。#include #include #include #include #include using namespace std;structTeam{ int rank ; stringname; int count ; int time ; int gm ; int Qus[7];}; Teamt[25];bool cmp1(Teama1,Teama2){ if(a1.count != a2.count) return a1.count > a2.count; else { if(a1.time != a2.time) ret... 阅读全文
posted @ 2013-07-25 09:41 T天天T 阅读(184) 评论(0) 推荐(0)
2013年7月24日
ZOJ 2165 Red and Black
摘要: 1.采用dfs:#include #include #include #include using namespace std;char map[25][25];int count = 1;int r,c;int dx[4] = {1,-1,0,0};int dy[4] = {0,0,1,-1};bool judge(int x,int y){ if(x= r || y =c) return 0; return 1;}void dfs(int x,int y){ map[x][y] = '#'; int nx = 0; int ny = 0; for(int i = 0 ; i 阅读全文
posted @ 2013-07-24 14:17 T天天T 阅读(163) 评论(0) 推荐(0)
2013年7月22日
Maya Calendar
摘要: 学会用字符数组来存。还有读取数据的细节。两个年对应的关系。#include #include #include #include char Haab[20][10] = {"pop", "no", "zip", "zotz", "tzec", "xul","yoxkin", "mol", "chen", "yax", "zac", "ceh", " 阅读全文
posted @ 2013-07-22 22:32 T天天T 阅读(272) 评论(0) 推荐(0)
2013年7月21日
ZOJ 1709 Oil Deposits
摘要: 最主要的是分清楚从一个点遍历到周围的点,并且将遍历过的点做好标记。还有就是弄清楚分界。#include using namespace std;char map[105][105];int n,m;int dy[10] = {-1,-1,-1,0,0,1,1,1};int dx[10] = {-1,0,1,-1,1,-1,0,1};int judge(int x,int y){ if(y m|| x n) { return 0; } return 1;}void dfs(int x, int y) { map[x][y] = -1; for(i... 阅读全文
posted @ 2013-07-21 21:06 T天天T 阅读(190) 评论(0) 推荐(0)
2013年7月19日
ACM:Protecting the Flowers
摘要: Farmer John went to cut some wood and leftN(2 ≤N≤ 100,000) cows eating the grass, as usual. When he returned, he found to his horror that the cluster of cows was in his garden eating his beautiful flowers. Wanting to minimize the subsequent damage, FJ decided to take immediate action and transport e 阅读全文
posted @ 2013-07-19 09:02 T天天T 阅读(273) 评论(0) 推荐(0)
2013年7月18日
2013-7-18
摘要: Many graduate students of Peking University are living in Wanliu Campus, which is 4.5 kilometers from the main campus - Yanyuan. Students in Wanliu have to either take a bus or ride a bike to go to school. Due to the bad traffic in Beijing, many students choose to ride a bike.We may assume that all 阅读全文
posted @ 2013-07-18 09:08 T天天T 阅读(330) 评论(0) 推荐(1)
上一页 1 2 3 4
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3