https://codeforces.com/problemset/problem/1117/E

就用abc表示数字来给每个数编码,编完直接问出移动的结果,反构造就行了,比C和D还简单。

#include<bits/stdc++.h>
using namespace std;
#define ll long long int n;
string s1,s2,s3; string t;
string q1,q2,q3; int pos[];
char s[]; void construct(){
for(int i=;i<n;i++){
s1+=(char)('a'+i%);
} int i=;
for(int p=;p<n;){
for(int j=;j<&&p<n;j++,p++){
s2+=(char)('a'+i%);
}
i++;
} i=;
for(int p=;p<n;){
for(int j=;j<*&&p<n;j++,p++){
s3+=(char)('a'+i%);
}
i++;
} //cout<<s1<<endl<<s2<<endl<<s3<<endl;
} void solve(){
for(int i=;i<n;i++){
int pp=;
pp+=(q3[i]-'a');
pp*=;
pp+=(q2[i]-'a');
pp*=;
pp+=(q1[i]-'a');
pos[i]=pp;
} /*for(int i=0;i<n;i++){
cout<<pos[i]<<" ";
}
cout<<endl;*/ for(int i=;i<n;i++){
s[pos[i]]=t[i];
} s[n]='\0';
cout<<"! "<<s<<endl;
fflush(stdout); } int main(){
cin>>t;
n=t.length();
construct(); cout<<"? "<<s1<<"\n";
fflush(stdout);
cin>>q1; cout<<"? "<<s2<<"\n";
fflush(stdout);
cin>>q2; cout<<"? "<<s3<<"\n";
fflush(stdout);
cin>>q3; solve();
}

最新文章

  1. C#--图片上传(PC端和APP)保存及 跨域上传说明
  2. iOS - XIB之AutoLayout添加约束
  3. Linux(CentOS)系统下设置nginx开机自启动
  4. thinkphp 代码执行
  5. MS14-025引起的问题 - 2
  6. easyui源码翻译1.32--ValidateBox(验证框)
  7. JAVA反射系列之Field,java.lang.reflect.Field使用获取方法
  8. 【Python爬虫实战--2】时间戳转换为指定格式日期
  9. 使用redis所维护的代理池抓取微信文章
  10. Java之List排序
  11. iOS 动态 Framework 对App启动时间影响实测
  12. 加壳工具-Virbox Protector Standalone
  13. python2.7安装beautifulsoup包
  14. Openvpn配置文件详解
  15. linux 挂载磁盘
  16. Spring Boot 静态资源映射与上传文件路由配置
  17. Android高级_第三方下载工具Volley
  18. Ubuntu x86-64汇编(4) 数值操作指令
  19. Android测试跑单个包脚本文件
  20. VSCode集成TypeScript编译

热门文章

  1. [转]c中按位分配int的方法
  2. git log 查看版本演变历史
  3. [Testing] Static Analysis Testing JavaScript Applications
  4. SolidEdge如何自动标注尺寸
  5. Effective C++ 条款九、十 绝不在构造和析构过程中调用virtual函数|令operator=返回一个reference to *this
  6. BAT&amp;注册表重定向劫持
  7. BEGINNING SHAREPOINT&amp;#174; 2013 DEVELOPMENT 第8章节--配送SP2013Apps 应用程序生命周期
  8. 把node加入master节点时,日志内容分析
  9. JSON与localStorage的爱恨情仇
  10. 蓝牙BlueTooth技术学习理解