水题。

#include<cstdio>
#include<cstring>
#include<cmath>
#include<string>
#include<algorithm>
using namespace std; long long L, R;
string Q = "XHUSTACM"; int main()
{
while (~scanf("%lld%lld", &L, &R))
{
long long tot = R - L + ;
long long st = L % ;
if (st == ) st = ; long long now = ;
while ()
{
printf("%c", Q[st-]);
now++;
if (now == tot) break;
st++;
if (st == ) st = ;
}
printf("\n"); }
return ;
}

HUST 1602 Substring的更多相关文章

  1. LeetCode[3] Longest Substring Without Repeating Characters

    题目描述 Given a string, find the length of the longest substring without repeating characters. For exam ...

  2. 最长回文子串-LeetCode 5 Longest Palindromic Substring

    题目描述 Given a string S, find the longest palindromic substring in S. You may assume that the maximum ...

  3. POJ3693 Maximum repetition substring [后缀数组 ST表]

    Maximum repetition substring Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 9458   Acc ...

  4. [LeetCode] Longest Substring with At Least K Repeating Characters 至少有K个重复字符的最长子字符串

    Find the length of the longest substring T of a given string (consists of lowercase letters only) su ...

  5. substring的用法

    public String substring(int beginIndex, int endIndex) 返回一个新字符串,它是此字符串的一个子字符串.该子字符串从指定的 beginIndex 处开 ...

  6. jQuery之常用且重要方法梳理(target,arguments,slice,substring,data,trigger,Attr)-(一)

    1.jquery  data(name) data() 方法向被选元素附加数据,或者从被选元素获取数据. $("#btn1").click(function(){ $(" ...

  7. leetcode--5. Longest Palindromic Substring

    题目来自 https://leetcode.com/problems/longest-palindromic-substring/ 题目:Given a string S, find the long ...

  8. C#和Java中的Substring()

    吐槽-使用清理软件整理电脑要注意,不要清理的"太狠",不然你会受伤的! C#中的Substring() 示例 实现代码 using System;using System.Coll ...

  9. JavaScript中的slice,splice,substr,substring,split的区别

    万恶的输入法,在sublime中会显示出繁体字,各位看官见谅. 1.slice()方法:该方法在数组和string对象中都拥有. var a = [1,2,3,4,5,6]; var s = 'thi ...

随机推荐

  1. Photos FrameWork 续

    1. Model PHAsset .PHAssetCollection.PHCollectionList 是Photos框架中的模型类,PHAsset类模型是图片或者视频文件数据:PHAssetCol ...

  2. HDU 1232 畅通工程(最小生成树+并查集)

    畅通工程 Time Limit : 1000/1000ms (Java/Other)   Memory Limit : 32768/32768K (Java/Other) Total Submissi ...

  3. elasticsearch 索引优化

    ES索引优化篇主要从两个方面解决问题,一是索引数据过程:二是检索过程.  索引数据过程我在上面几篇文章中有提到怎么创建索引和导入数据,但是大家可能会遇到索引数据比较慢的过程.其实明白索引的原理就可以有 ...

  4. #ifndef 和 #endif

    文件中的#ifndef 头件的中的#ifndef,这是一个很关键的东西.比如你有两个C文件,这两个C文件都include了同一个头文件.而编译时,这两个C文件要一同编译成一个可运行文件,于是问题来了, ...

  5. java synchronized内置锁的可重入性和分析总结

    最近在读<<Java并发编程实践>>,在第二章中线程安全中降到线程锁的重进入(Reentrancy) 当一个线程请求其它的线程已经占有的锁时,请求线程将被阻塞.然而内部锁是可重 ...

  6. HDU - 5234 Happy birthday

    Problem Description Today is Gorwin’s birthday. So her mother want to realize her a wish. Gorwin say ...

  7. ActiveMQ的配置与使用

    1.什么是ActiveMQ MQ全称为Message Queue, 消息队列(MQ)是一种应用程序对应用程序的通信方法.应用程序通过写和检索出入列队的针对应用程序的数据(消息)来通信,而无需专用连接来 ...

  8. CodeForces 678C Joty and Chocolate

    简单题. #include<cstdio> #include<cstring> #include<cmath> #include<algorithm> ...

  9. cordova 启动界面config.xml配置

    <preference name="SplashScreen" value="screen"/> <preference name=" ...

  10. Servlet程序开发--Servlet简介

    使用java语言开发的服务器端程序,可以生成动态web页,运行在服务器端,由服务器调用执行,是一种按照servlet标准开发的类. 先有servlet,后有jsp,jsp骨子里依然是servlet. ...