• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
DementRock
   首页          管理     
2010年2月15日
Sgu 404
摘要: 又是水题,做个取余就行了sgu 404Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--1#include<stdio.h>2#include<stdlib.h>3#include<string.h>4intmain(... 阅读全文
posted @ 2010-02-15 20:56 DementRock 阅读(129) 评论(0) 推荐(0)
Sgu 137
摘要: 这是一道构造题。设一个满足对应的N和K的串为S(N,K)。首先要理解题意,一次“rotate” 指,对于S0S2.....SN-1,向左rotate则变换为S2S3..SN-1S0。很显然,如果S(N,K mod N)已经求得,只需每个数加上[K/N]即可。现在,还有(K mod N)个数上要再加1,显然SN-1是其中一个。设经过若干次rotate之后,S(i+p) mod... 阅读全文
posted @ 2010-02-15 18:36 DementRock 阅读(447) 评论(0) 推荐(0)
Sgu 276
摘要: 水题一道,分析好情况就行了(注意p<=0的情况)sgu276Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--1#include<stdio.h>2#include<stdlib.h>3intmain()4{5ints,p,... 阅读全文
posted @ 2010-02-15 18:23 DementRock 阅读(151) 评论(0) 推荐(0)
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3