1. #include<bits/stdc++.h>
  2. #define N 110
  3. int main(void)
  4. {
  5. char s[N][N];
  6. int i, j, k, max;
  7. for (i = max = , memset(s, ' ', sizeof(s)); fgets(s[i], N, stdin); i++)
  8. if (strlen(s[i]) > max)
  9. max = strlen(s[i]);
  10. for (j = ; j < max-; j++) {
  11. for (k = i-; k >= ; k--)
  12. s[k][j] != '\n' && s[k][j] ? putchar(s[k][j]) : putchar(' ');
  13. printf("\n");
  14. }
  15. return ;
  16. }

这道题的难点在于怎么确定读取一行数据,用fgets读取数据流中的所有字符。

fgets(s,size,stdin);//从标准输入流中读取一行数据到s[]里面去。

Rotating Sentences的更多相关文章

  1. 490 - Rotating Sentences

     Rotating Sentences  In ``Rotating Sentences,'' you are asked to rotate a series of input sentences ...

  2. UVa 490 - Rotating Sentences

    https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=94&page=s ...

  3. UVA_490:Rotating Sentences

    "R  Ie   n  te  h  iD  ne  kc  ,a   r  tt  he  es  r  eo  fn  oc  re  e   s  Ia   i  ad  m,  .  ...

  4. UVA题目分类

    题目 Volume 0. Getting Started 开始10055 - Hashmat the Brave Warrior 10071 - Back to High School Physics ...

  5. 【索引】Volume 0. Getting Started

    AOAPC I: Beginning Algorithm Contests (Rujia Liu) Volume 0. Getting Started 10055 - Hashmat the Brav ...

  6. 【英语魔法俱乐部——读书笔记】 3 高级句型-简化从句&倒装句(Reduced Clauses、Inverted Sentences) 【完结】

    [英语魔法俱乐部——读书笔记] 3 高级句型-简化从句&倒装句(Reduced Clauses.Inverted Sentences):(3.1)从属从句简化的通则.(3.2)形容词从句简化. ...

  7. 【英语魔法俱乐部——读书笔记】 2 中级句型-复句&合句(Complex Sentences、Compound Sentences)

    [英语魔法俱乐部——读书笔记] 2 中级句型-复句&合句(Complex Sentences.Compound Sentences):(2.1)名词从句.(2.2)副词从句.(2.3)关系从句 ...

  8. 【英语魔法俱乐部——读书笔记】 1 初级句型-简单句(Simple Sentences)

    第一部分 1 初级句型-简单句(Simple Sentences):(1.1)基本句型&补语.(1.2)名词短语&冠词.(1.3)动词时态.(1.4)不定式短语.(1.5)动名词.(1 ...

  9. hdu 3307 Description has only two Sentences (欧拉函数+快速幂)

    Description has only two SentencesTime Limit: 3000/1000 MS (Java/Others) Memory Limit: 65536/32768 K ...

随机推荐

  1. 如何调试R程序(转载)

    R语言的调试重要性不言而喻,这段时间准备改进一个R的包,但由于接触R时间不长,中间的很多东西不懂,需要重新打包调试,以对里面的很多程序有深入了解,下面从几个方面分享一下我的收获. 1.准备工作 a)R ...

  2. quick-cocos2d-x学习笔记—定时器

    定时器用的地方还是比较多的,游戏中的逻辑判断很多都是采用每帧执行.quick对于schedule的封装在scheduler这个lua文件中.如果是第一次接触quick的话,可能按照官方的api来写一个 ...

  3. Mysql性能监控

    show processlist; show global variables like 'max_allowed_packet'; // QPS计算(每秒查询数)show global status ...

  4. ubuntu下git输出的颜色变化

    (这些文章都是从我的个人主页上粘贴过来的,大家也可以访问我的主页 www.iwangzheng.com) 11点进家门,感觉很温暖哦. 以下是如何在用git的时候清晰的看出关键字的方法. $ vim ...

  5. Linux常用热键(持续更新)

    (这些文章都是从我的个人主页上粘贴过来的,大家也可以访问我的主页 www.iwangzheng.com) --圣诞节怎么过, --略过. 今天装ubuntu的时候把windows覆盖了, 凌乱,TX童 ...

  6. DICOM:Ubuntu14环境下安装dcm4chee+oviyam2.1

    背景: 之前博文DICOM:开源DICOM服务框架DCM4CHEE安装中曾介绍过在Windows7环境下安装部署dcm4chee.近期公司项目需要与部署到Linux系统的远端基于dcm4chee框架的 ...

  7. 如何下载google play免费应用的apk文件

    到这里: http://apps.evozi.com/apk-downloader/ 一看便知.

  8. Windows命令行重命名文件

    RENAME D:\Cache\xyz.html xyz%date:~0,4%%date:~5,2%%date:~8,2%.tar.gz

  9. Windows命令行提取日期时间

    参考: http://elicecn.blog.163.com/blog/static/174017473200931910320556/ SET str="%date:~0,4%%date ...

  10. object-c面向对象2

    我们知道在c#中有访问私有成员变量的get  和set方法.这个目的是用来公开实力对象的私有变量.我看了下ios的访问修饰符.也就是private,public,protected.这些基本上都和c# ...