[河南省ACM省赛-第四届] 序号互换 (nyoj 303)
相似与27进制的转换
#include<iostream>
#include<cstdio>
#include<cstring>
#include<string>
#include<cstdlib>
#include<algorithm>
#include<stack>
using namespace std;
int main(){
int t;
string s;
cin>>t;
while(t--)
{
cin>>s;
] >= 'A') {
;
int len = s.length();
; i<len; i++){
res = res*+s[i]-;
}
cout<<res<<endl;
} else {
string res;
int n = atoi(s.c_str());
while(n){
== ){
res += 'Z';
n -= ;
}
else
res += n%+;
n /= ;
}
reverse(res.begin(), res.end());
cout<<res<<endl;
}
}
;
}
[河南省ACM省赛-第四届] 序号互换 (nyoj 303)的更多相关文章
- 河南省第四届ACM省赛(T1) 序号互换
问题 A: 序号互换 时间限制: 1 Sec 内存限制: 128 MB难度1 题目描述 Dr.Kong设计了一个聪明的机器人卡多,卡多会对电子表格中的单元格坐标快速计算出来.单元格的行坐标是由数字编 ...
- [河南省ACM省赛-第四届] 表达式求值(nyoj 305)
栈的模拟应用: #include<iostream> #include<cstdio> #include<cstring> #include<string&g ...
- [河南省ACM省赛-第三届] 素数 (nyoj 169)
#include <iostream> #include <cstdio> #include <queue> #include <cstring> #i ...
- [河南省ACM省赛-第三届] 房间安排 (nyoj 168)
题目链接:http://acm.nyist.net/JudgeOnline/problem.php?pid=168 分析:找到一天中需要最多的房间即可 #include<iostream> ...
- [河南省ACM省赛-第三届] AMAZING AUCTION (nyoj 251)
题目链接:http://acm.nyist.net/JudgeOnline/problem.php?pid=251 规则: 1.若某竞标价唯一,则胜出 2.若不存在唯一竞标价,则投标次数最少竞标价中标 ...
- [河南省ACM省赛-第三届] 网络的可靠性 (nyoj 170)
题目链接:http://acm.nyist.net/JudgeOnline/problem.php?pid=170 根据题意,需要找到度数为1的结点个数,如下图: #include<iostre ...
- [河南省ACM省赛-第三届] 聪明的kk (nyoj 171)
题目链接:http://acm.nyist.net/JudgeOnline/problem.php?pid=171 动态规划: d(i,j) = max{d(i-1, j), d(i, j-1)}+m ...
- [河南省ACM省赛-第三届] BUYING FEED (nyoj 248)
#include<iostream> #include<cstdio> #include<algorithm> #include<cstring> us ...
- 第四届河南省ACM 序号互换 进制转换
序号互换 时间限制: 1 Sec 内存限制: 128 MB 提交: 41 解决: 19 [提交][状态][讨论版] 题目描述 Dr.Kong设计了一个聪明的机器人卡多,卡多会对电子表格中的单元格坐 ...
随机推荐
- nc 简单的使用
非常强大的网络工具nc netcat 下面自己总结了它的几种常用用法(参考了它的man): 1.聊天 ClientA: nc - ClientB: nc A'sIP 1234 2.数据传输 Clien ...
- 字符串子串查找strstr
问题: 函数名: strstr 函数原型:char *strstr(const char *str1, const char *str2); 语法:* strstr(str1,str2) str1: ...
- CSS hack大全&详解(什么是CSS hack)
1.什么是CSS hack? 本文转自程序园学院:http://www.kwstu.com/Admin/ViewArticle/201409011604277330 CSS hack是通过在CSS样式 ...
- breakpad是Google开源的一套跨平台工具
windows下捕获dump之Google breakpad_client的理解 breakpad是Google开源的一套跨平台工具,用于dump的处理.很全的一套东西,我这里只简单涉及break ...
- 纯Python综合图像处理小工具(2)图像增强
<背景> 这次分享的脚本是对图像进行增强处理,包含对图像像素的色彩增强.亮度增强.对比度增强.图像尖锐化等增强操作,主要基于PIL包的lambda和ImageEnhance模块. 使用方法 ...
- Your personal Mail Server iRedMail on ubuntu14.04 x64
what we have? iRedMail -> http://iredmail.com Get the script over there. http://www.ired ...
- http学习笔记(3)
几乎所有的http通信都是由TCP/IP承载的.http好比一辆汽车,而TCP是一条公路,所有的汽车都要在公路上跑,看看http是如何在tcp这条公路上往返的. 首先简单地看看tcp,TCP连接是通过 ...
- hdu 4467 Graph
P. T. Tigris is a student currently studying graph theory. One day, when he was studying hard, GS ap ...
- 一个简单的string类,读书看报系列(一)
对于这个类,写过程序的都知道应该含有的方法是 初始化.销毁.拼接.求长度.清除.判断是否为空等.还有一些操作符重载 一.先看初始化: 可以想到应该有默认构造的的.带有字符串的.带有默认字符的.还有一个 ...
- ESLint--定制你的代码规则
简介 ESLint是一个开源的项目,由Nicholas C. Zakas(<JavaScript高级程序设计>作者)于2013年六月创建.它的目标是为JavaScript提供一个完全可配置 ...