zoukankan      html  css  js  c++  java
  • HUST 1358 Uiwurerirexb jeqvad(模拟解密)

    Uiwurerirexb jeqvad

    Description

    Fmur lan oxbrvu mzx, E abpxcay Jvmffabza qdxwfaou eb vmjsad.xdz, eb nvejv rvada mda ombc jdcqrxzdmqvc qdxwfaou. Moxbz rvaua qdxwfaou rvada mda ombc iuebz uiwurerirexb jeqvad oarvxy. Rx sbxn oxda mwxir er, E nabr rx Neseqayem: 
    Eb jdcqrxzdmqvc, m uiwurerirexb jeqvad eu m oarvxy xl abjdcqrexb wc nvejv iberu xl qfmebrakr mda daqfmjay nerv jeqvadrakr mjjxdyebz rx m dazifmd ucurao; rva "iberu" omc wa uebzfa farradu (rva oxur jxooxb), qmedu xl farradu, rdeqfaru xl farradu, oekridau xl rva mwxta, mby ux lxdrv. Rva dajaetad yajeqvadu rva rakr wc qadlxdoebz mb ebtadua uiwurerirexb. Uiwurerirexb jeqvadu jmb wa jxoqmday nerv rdmbuqxuerexb jeqvadu. Eb m rdmbuqxuerexb jeqvad, rva iberu xl rva qfmebrakr mda damddmbzay eb m yelladabr mby iuimffc giera jxoqfak xdyad, wir rva iberu rvaouaftau mda falr ibjvmbzay. Wc jxbrdmur, eb m uiwurerirexb jeqvad, rva iberu xl rva qfmebrakr mda darmebay eb rva umoa uagiabja eb rva jeqvadrakr, wir rva iberu rvaouaftau mda mfraday. Rvada mda m biowad xl yelladabr rcqau xl uiwurerirexb jeqvad. El rva jeqvad xqadmrau xb uebzfa farradu, er eu radoay m ueoqfa uiwurerirexb jeqvad; m jeqvad rvmr xqadmrau xb fmdzad zdxiqu xl farradu eu radoay qxfczdmqvej. Moxbxmfqvmwarej jeqvad iuau lekay uiwurerirexb xtad rva abreda oauumza, nvadamu m qxfcmfqvmwarej jeqvadiuau m biowad xl uiwurerirexbu mr yelladabr reoau eb rva oauumza, nvada m iber ldxo rva qfmebrakr eu omqqay rx xba xl uatadmf qxuuewefereau eb rva Jeqvadrakr mby teja-tadum. 
    Rveu reoa E zeta cxi uijv m qdxwfao, eb nvejv Yaujdeqrexb, Ebqir, Xirqir, Umoqfa Ebqir mda mff jeqvadrakr, nvadamu Umoqfa Xirqir eu iuebz qfmebrakr. Xl jxidua, rveu qdxwfao eu iuebz ueoqfa uiwurerirexb jeqvad mby oxbxmfqvmwarej jeqvad. Rx uxfta oxbxmfqvmwarej jeqvad allejeabrfc, cxi jmb dalad rxvrrq://nnn.uajdarjxyawdamsad.jxo/UJWUxftd.heq

    Input

    Rva ebqir jxbrmebu oifreqfa jmuau. Amjv jmua vmu xbfc xba feba – jeqvadrakr nerv bx oxda rvmb 100 jvmdmjradu. Eb amjv jeqvadrakr, rvada mda xbfc fxnad farradu mby uqmjau.

    Output

    Lxd amjv jmua, xirqir xba feba - rva qfmebrakr jxddauqxbyebz rx rva ebqir. Daoaowad rvmr famta uqmjau mfxba.

    Sample Input

    g g g

    Sample Output

    q q q

    题解:水,但是好难...第一眼看过去,我以为是乱码。。。看看Description最后的网址,vrrq://nnn.uajdarjxyawdamsad.jxo/UJWUxftd.heq,网址应该是http开头的才对,原来这个题目连题目都是经过加密的= =,就从网址入手,得到1/3的密码表,再根据input,output里那些通用的“for each case”“not more than”之类的去找出剩下的密码表,英语不好真心累。

    #include <cstdio>
    #include <iostream>
    #include <string>
    #include <sstream>
    #include <cstring>
    #include <stack>
    #include <queue>
    #include <algorithm>
    #include <cmath>
    #include <map>
    #define PI acos(-1.0)
    #define ms(a) memset(a,0,sizeof(a))
    #define msp memset(mp,0,sizeof(mp))
    #define msv memset(vis,0,sizeof(vis))
    using namespace std;
    //#define LOCAL
    char a[]=
    {
      'e','n','y','r',
      'i','l','q','z',
      'u','c','x','f',
      'a','w','m','j',
      'p','t','k','v',
      's','h','b','o',
      'd','g'
    };
    int main()
    {
    #ifdef LOCAL
        freopen("in.txt", "r", stdin);
    #endif // LOCAL
        ios::sync_with_stdio(false);
        char c;
        while((c=getchar())!=EOF)
        {
            if(isalpha(c))
            {
                if(isupper(c))
                printf("%c",toupper(a[c-'A']));
                else printf("%c",a[c-'a']);
            }
            else printf("%c",c);
        }
        return 0;
    }
    View Code
  • 相关阅读:
    fiddler使用
    Laravel数据库操作
    mysql 小知识点备忘(一)
    移动端和服务器端通信
    js函数和代码片段
    tomcat9目录结构解析
    数据库三范式的理解
    win10修改hosts文件
    Java十六进制字符串与二进制数组互转、&0xff的作用
    15、SpringBoot实现Excel的导入导出
  • 原文地址:https://www.cnblogs.com/gpsx/p/5197903.html
Copyright © 2011-2022 走看看