• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
tmeteorj
Nothing is so big that it is impossible to get over, and hurt only serves to make us stronger. 没有什么事是大到无法战胜的,痛苦也只会让我们变得更加坚强。
博客园 | 首页 | 新随笔 | 新文章 | 联系 | 订阅 订阅 | 管理

2012年9月22日

POJ 2556
摘要: 题意:一个点从(300,420)走到(310,420),方向向右,然后遇到A向右转90度再直走10,反之,向左转90度再直走10.题解:同上View Code 1 #include<cstdio> 2 #include<cstring> 3 using namespace std; 4 int dr[][2]={10,0,0,-10,-10,0,0,10}; 5 int main() 6 { 7 char s[250]; 8 while(gets(s)) 9 {10 int x=310,y=420,d=0;11 printf("300 ... 阅读全文
posted @ 2012-09-22 20:04 tmeteorj 阅读(162) 评论(0) 推荐(0)
 
POJ 3705
摘要: 题意:通过复制粘贴将正序序列变成逆序序列,要求步骤最少。题解:分奇偶讨论,若是奇数,则反复的将最大的那数前面的偶数个数的中间两个挪到后面相应位置,如n=71 2 3 4 5 6 71 2 5 6 7 3 41 6 7 3 2 5 47 3 2 1 6 5 4这样做可以使得每次移动都形成两个降序序列。View Code 1 #include<cstdio> 2 #include<cstring> 3 #include<algorithm> 4 using namespace std; 5 int main() 6 { 7 int n; 8 while(scan 阅读全文
posted @ 2012-09-22 11:51 tmeteorj 阅读(234) 评论(0) 推荐(0)
 
 

公告


博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3