#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. 使用navicat进行数据表迁移

    使用navicat进行数据和表迁移只需要复制,粘贴就可以实现.

  2. GWT中自定义你的"cell"

    GWT内部提供了CellTable组件,它允许自由增加column以及cell,在设定column之后就是在其中填充cell了.但GWT所提供的CellTable样式确实不敢恭维,为了解决这一问题,在 ...

  3. POJ3264(RMQ-ST算法)

    Balanced Lineup Time Limit: 5000MS   Memory Limit: 65536K Total Submissions: 47087   Accepted: 22101 ...

  4. 网页效果分析 VCD分解

    VCD分解分为三部分: 1. view 视觉                   HTML + CSS 基本界面模板 2. controller 控制            javascript  内 ...

  5. form(去掉关闭按钮,禁止调整大小)

    禁止Form窗口调整大小方法:FormBorderStyle 设为FixedSingle: 不能使用最大化窗口: MaximuzeBox 设为False: 不能使用最小化窗口:   MinimizeB ...

  6. 【转载】你知道 Linux 内核是如何构建的吗?

    内核的根 Makefile 负责构建两个主要的文件:vmlinux (内核镜像可执行文件)和模块文件.内核的 Makefile 从定义如下变量开始: VERSION = PATCHLEVEL = SU ...

  7. python+requests+excel 接口测试

    1.EXCEL文件接口保存方式,如图. 2.然后就是读取EXCEL文件中的数据方法,如下: import xlrd class readExcel(object): def __init__(self ...

  8. 【259】ucpole.dat update

    2017年2月21日 57871 +0.020896 0.007232 +0.414732 0.009212 +0.418044 0.007533 p 57872 +0.022055 0.007284 ...

  9. Jedis连接redis的一些基本操作

    Jedis其实就是redis的一个连接方式 需要的jar包:

  10. Using JConsole

    Using JConsole 转自 https://docs.oracle.com/javase/8/docs/technotes/guides/management/jconsole.html Th ...