#include <bits/stdc++.h>
using namespace std;
int main(){
 string t;
 cin>>t;
 int n=t.size();
 string s1(n,'a'),s2(n,'a'),s3(n,'a');
 for(int i=0;i<n;i++){
  s1[i]=char('a'+(i%26));//从a到z循环
  s2[i]=char('a'+((i/26)%26));//第i位为(i/26)%26+'a',保证了26*26内不会和s1相同
  s3[i]=char('a'+((i/26/26)%26));//保证了26^3内不会和s1相同,类似哈希编码
 }
 cout<<"? "<<s1<<endl;
 string t1;
 cin>>t1;
 cout<<"? "<<s2<<endl;
 string t2;
 cin>>t2;
 cout<<"? "<<s3<<endl;
 string t3;
 cin>>t3;
 vector<int>p(n);
 for(int i=0;i<n;i++)
  p[i]=(t1[i]-'a')+(t2[i]-'a')*26+(t3[i]-'a')*26*26;//将变化后的值根据编码还原
 string s(n,'a');
 for(int i=0;i<n;i++)
  s[p[i]]=t[i];//26^3>1000,所以可行
 cout<<"! "<<s<<endl;
 return 0;
}

Educational Codeforces Round 60 (Rated for Div. 2)E(思维,哈希,字符串,交互)的更多相关文章

  1. Educational Codeforces Round 60 (Rated for Div. 2) - C. Magic Ship

    Problem   Educational Codeforces Round 60 (Rated for Div. 2) - C. Magic Ship Time Limit: 2000 mSec P ...

  2. Educational Codeforces Round 60 (Rated for Div. 2) - D. Magic Gems(动态规划+矩阵快速幂)

    Problem   Educational Codeforces Round 60 (Rated for Div. 2) - D. Magic Gems Time Limit: 3000 mSec P ...

  3. Educational Codeforces Round 60 (Rated for Div. 2) 题解

    Educational Codeforces Round 60 (Rated for Div. 2) 题目链接:https://codeforces.com/contest/1117 A. Best ...

  4. Educational Codeforces Round 60 (Rated for Div. 2)

    A. Best Subsegment 题意 找 连续区间的平均值  满足最大情况下的最长长度 思路:就是看有几个连续的最大值 #include<bits/stdc++.h> using n ...

  5. Educational Codeforces Round 60 (Rated for Div. 2)D(思维,DP,快速幂)

    #include <bits/stdc++.h>using namespace std;const long long mod = 1e9+7;unordered_map<long ...

  6. Educational Codeforces Round 60 (Rated for Div. 2) 即Codeforces Round 1117 C题 Magic Ship

    time limit per test 2 second memory limit per test 256 megabytes input standard inputoutput standard ...

  7. Educational Codeforces Round 60 (Rated for Div. 2) D. Magic Gems(矩阵快速幂)

    题目传送门 题意: 一个魔法水晶可以分裂成m个水晶,求放满n个水晶的方案数(mol1e9+7) 思路: 线性dp,dp[i]=dp[i]+dp[i-m]; 由于n到1e18,所以要用到矩阵快速幂优化 ...

  8. Educational Codeforces Round 60 (Rated for Div. 2) E. Decypher the String

    题目大意:这是一道交互题.给你一个长度为n的字符串,这个字符串是经过规则变换的,题目不告诉你变换规则,但是允许你提问3次:每次提问你给出一个长度为n的字符串,程序会返回按变换规则变换后的字符串,提问3 ...

  9. Educational Codeforces Round 90 (Rated for Div. 2) B. 01 Game(字符串博弈)

    题目链接:https://codeforces.com/contest/1373/problem/B 题意 给出一个二进制串 $s$,Alica 和 Bob 每次可以选择移去 $s$ 中的一个 $10 ...

随机推荐

  1. 除了IE浏览器能识别之外,其他浏览器都不能识别的html写法

    最近写html页面的时候发现顶部边界margin-top用了定位之后,IE的跟其他浏览器不同,所以用到了把IE跟其他浏览器区分开来的写法 <!--[if !IE]> <div cla ...

  2. TreeView 树节点的处理

    TreeView 树节点的处理 using System; using System.Collections.Generic; using System.ComponentModel; using S ...

  3. 【OK210试用体验】进阶篇(2)视频图像采集之MJPG-streamer编译(arm移植)

    上一篇([OK210试用体验]进阶篇(1)视频图像采集之MJPG-streamer编译(Ubuntu系统下))进行了MJPG-streamer在Ubuntu下的编译及测试,这一篇针对OK210,进行a ...

  4. Python打造一个目录扫描工具

    目标:用Python3写一款小型的web目录扫描工具 功能:1.扫描指定站点 2.指定网站脚本类型来扫描 3.可控线程 4.可保存扫描结果 首先定义一个命令参数的函数 def parse_option ...

  5. CDM中,实体与实体快捷方式之间的联系不能重复,否则会造成外键重复

    例如机场实体和跑道实体,例如: 在机场包中,跑道实体作为快捷方式出现,机场实体与跑道快捷方式实体间有连线关系,然而 在跑道包中,情况相反,但二者间也有连线.(模型原样) 要注意的是,虽然在两个包中都有 ...

  6. 关于struts2.3的action

    struts2.3中支持实时配置,也就是说不用在struts.xml中进行配置.但是所有的action文件应该放在有路径名含action的包中,否则程序无法发现你的action. 这个问题,难为了我好 ...

  7. leetcode482

    这道题主要使用了C++的几个API,大小写转化,字符串替换.其余的逻辑都比较简单.而且经查资料,string类字符串拼接的速度使用+=的速度是很快的.以下代码,也是用的+=来拼接字符串. string ...

  8. myeclipse debug 工具栏不见了

    1.打开myeclipse,点击右上角的debug图标.如图: 点击debug页面右上角的三角形,把下拉菜单的Show Debug Toobar给勾上.如图: 3 这样debug工具的已经显示出来了

  9. ping 127.0.0.1请求超时的解决办法?

    转自:http://blog.51cto.com/dengyong/1429699 打开网络连接,你很有可能启用了虚拟wifi.若有无线网卡就把无线网卡关掉,然后本地连接那里(就是有线网卡的那个连接) ...

  10. java中sleep()的用法

    Thread.sleep(long millis)和Thread.sleep(long millis, int nanos)静态方法强制当前正在执行的线程休眠(暂停执行),以“减慢线程”. 当线程睡眠 ...