Gravatar
Theresis
积分:491
提交:160 / 366
回复 @ItsOreó :
23333

Gravatar
reØreOré
积分:651
提交:295 / 530
回复 @增强型图元文 :
啊这
哈哈哈hhhh

Gravatar
增强型图元文件
积分:801
提交:481 / 1183
不会吧不会吧真有人这道题都要问别人

Gravatar
kZime
积分:1101
提交:334 / 677
废了。。。水题调半小时

Gravatar
渴望诗的小男孩
积分:59
提交:22 / 107
回复 @邹 :
你为什什么题写完都要发言

Gravatar
Ays
积分:173
提交:52 / 253
自己以前太弱了...一天没过的题这次半个小时水过
ps 刚发完这个评论oj就炸了...这个问题?

Gravatar
zeppoe
积分:385
提交:147 / 405
('A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'),
('B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','A'),
('C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','A','B'),
('D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','A','B','C'),
('E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','A','B','C','D'),
('F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','A','B','C','D','E'),
('G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','A','B','C','D','E','F'),
('H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','A','B','C','D','E','F','G'),
('I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','A','B','C','D','E','F','G','H'),
('J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','A','B','C','D','E','F','G','H','I'),
('K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','A','B','C','D','E','F','G','H','I','J'),
('L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','A','B','C','D','E','F','G','H','I','J','K'),
('M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','A','B','C','D','E','F','G','H','I','J','K','L'),
('N','O','P','Q','R','S','T','U','V','W','X','Y','Z','A','B','C','D','E','F','G','H','I','J','K','L','M'),
('O','P','Q','R','S','T','U','V','W','X','Y','Z','A','B','C','D','E','F','G','H','I','J','K','L','M','N'),
('P','Q','R','S','T','U','V','W','X','Y','Z','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O'),
('Q','R','S','T','U','V','W','X','Y','Z','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P'),
('R','S','T','U','V','W','X','Y','Z','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q'),
('S','T','U','V','W','X','Y','Z','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R'),
('T','U','V','W','X','Y','Z','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S'),
('U','V','W','X','Y','Z','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T'),
('V','W','X','Y','Z','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U'),
('W','X','Y','Z','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V'),
('X','Y','Z','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W'),
('Y','Z','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X'),
('Z','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y');

Gravatar
TARDIS
积分:1688
提交:443 / 1080
回复 @铁策 :
需要用加文件操作的.......

Gravatar
BillAlen
积分:78
提交:16 / 28
这道题,用密钥算个offset然后把加密后的减去offset,如果比A或a小就加上26。
十分弱智的一道题,打表都不用。

Gravatar
Riolu
积分:1074
提交:435 / 772
第六个点 nimahannihuijiachifanaaaaaaaaaaaaaa 什么鬼!!!!wa50刷新一下就变成AC100了!!!!!!!

Gravatar
NVIDIA
积分:1171
提交:301 / 546
这是官方解题方案真是简洁官方

#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
using namespace std;
const int maxn = 2000;
char S[maxn],T[maxn];
int calc(char c)
{
return (int(c)-65-(c>=97?32:0));
}
int main()
{
scanf("%s",S);
scanf("%s",T);
for (int i = 0 ; T[i]!='\0'; ++i)
{
for (int j = 0 ; j < 26; ++j)
{
if ((j+calc(S[i%strlen(S)]))%26 == calc(T[i]))
printf("%c",j+65+(T[i]>=97?32:0));
}
}
return 0;
}

Gravatar
<蒟蒻>我要喝豆奶
积分:848
提交:242 / 543

Gravatar
Asm.Def
积分:1019
提交:240 / 495
直接用'A'和'a'多方便……干嘛要去查AscII码呢= =

Gravatar
→震世逆空波→
积分:573
提交:189 / 310
回复 @ICE LUGER :
表這種東西,從出生開始就是被人打得

Gravatar
乌龙猹
积分:1288
提交:469 / 784
回复 @冰柚子 :
好表(diao)

Gravatar
水中音
积分:1266
提交:406 / 833
表在此

Gravatar
TerryLam
积分:134
提交:53 / 143
第29~32行写成
if (c[i] in [0..25]) then
c[i]:=(c[i]-k[(i-1) mod p+1]) mod 26
else
c[i]:=(c[i]-k[(i-1) mod p+1]-32) mod 26+32;
会搞成乱码,只能加上26或52再给26求模,答案才不会错

Gravatar
cstdio
积分:4748
提交:1198 / 2108
@常可神牛 不用像这样贴代码,这样太影响市容……把“允许查看你提交的代码”选上就行了

Gravatar
铁策
积分:985
提交:301 / 737
这是我的程序:
program P1778;
var
m,n:ansistring;
x:char;
i,j,k,l,c:integer;
begin
assign(input,'vigenere.in');
reset(input);
assign(output,'vigenere.out');
rewrite(output);
readln(m);
readln(n);
for i:=1 to length(m) do
m[i]:=lowercase(m[i]);
c:=length(m);
for i:=1 to 10 do
m:=m+m;
for i:=1 to length(n) do
begin
case n[i] of
'A'..'Z':
for x:='A' to 'Z' do
begin
j:=ord(m[i])-65;
k:=ord(x)-97;
l:=(k+j) mod 26+65;
if chr(l)=n[i] then begin write(x); break; end;
end;
'a'..'z':for x:='a' to 'z' do
begin
j:=ord(m[i])-97;
k:=ord(x)-97;
l:=(k+j) mod 26+97;
if chr(l)=n[i] then begin write(x); break; end;
end;
end;
end;
end.

其他Oj都能过啊!
http://wikioi.com/code/317292/
https://www.vijos.org/records/511240174e4112280f14c390
https://www.tyvj.cn/Record_Show.aspx?id=1068935

Gravatar
钨铅
积分:440
提交:135 / 315
就是那两个函数问题,大家以后不要用啊,会全部超时的