有高雅的做法吗?(不打表)

P1079 [NOIP2012 提高组] Vigenère 密码

@[pascalfans](/space/show?uid=87551) 这题还能打表?
by x_angelkawaii_x @ 2018-08-11 12:33:10


@[沉迷学习的YSJ](/space/show?uid=93483) 应该是指把转换方式用一个二维数组表示出来
by _FILARET_ @ 2018-08-11 12:33:57


@[deadpool123](/space/show?uid=84121) 你是我肚子里的蛔虫
by pascalfans @ 2018-08-11 12:39:26


@[deadpool123](/space/show?uid=84121) 感觉挺神奇的,直接加不就行了吗
by x_angelkawaii_x @ 2018-08-11 12:43:04


@[pascalfans](/space/show?uid=87551) 毒瘤( ͡° ͜ʖ ͡°)
by _FILARET_ @ 2018-08-11 12:45:06


@[沉迷学习的YSJ](/space/show?uid=93483) 当然那样做太简单了
by _FILARET_ @ 2018-08-11 12:45:21


应该可以
by jinhaoxian @ 2018-08-14 08:44:19


@[_FILARET_](/user/84121) 对,转换! ```cpp char mul(char a,char b)//R运算,不是乘法,乱写个单词。 { int a1,b1,result; if(a>='A'&&a<='Z') a1=a-64;//字母转数字。 else a1=a-96; if(b>='A'&&b<='Z') b1=b-65; else b1=b-97; result=a1+b1; if(result>26) result-=26; if(a>='A'&&a<='Z')//跟随明文,不跟随密钥。 result+=64;//结果转换回字符。 else result+=96; return char(result); } ``` 这是加密,解密你暴力枚举就行了。
by Eric12 @ 2021-07-22 16:54:54


@[cmdysj](/user/93483) 直接加可以
by Eric12 @ 2021-07-22 16:56:05


|