{"id":5817,"date":"2024-08-30T23:01:01","date_gmt":"2024-08-30T15:01:01","guid":{"rendered":""},"modified":"2024-08-30T23:01:01","modified_gmt":"2024-08-30T15:01:01","slug":"\u62fc\u97f3\u5b57\u6bcd_a o e i u 26\u4e2a\u62fc\u97f3\u5b57\u6bcd\u8868\u987a\u5e8f","status":"publish","type":"post","link":"https:\/\/mushiming.com\/5817.html","title":{"rendered":"\u62fc\u97f3\u5b57\u6bcd_a o e i u 26\u4e2a\u62fc\u97f3\u5b57\u6bcd\u8868\u987a\u5e8f"},"content":{"rendered":"
\n \/*
\n
\u9898\u76ee\u5982\u4e0b\uff1a <\/p>\n

\u3010\u7f16\u7a0b\u9898\u3011(\u6ee1\u520619\u5206)\n<\/p><\/div>\n

\n     \u5728\u5f88\u591a\u8f6f\u4ef6\u4e2d\uff0c\u8f93\u5165\u62fc\u97f3\u7684\u9996\u5199\u5b57\u6bcd\u5c31\u53ef\u4ee5\u5feb\u901f\u5b9a\u4f4d\u5230\u67d0\u4e2a\u8bcd\u6761\u3002\u6bd4\u5982\uff0c\u5728\u94c1\u8def\u552e\u7968\u8f6f\u4ef6\u4e2d\uff0c\u8f93\u5165: \u201cbj\u201d\u5c31\u53ef\u4ee5\u5b9a\u4f4d\u5230\u201c\u5317\u4eac\u201d\u3002\u600e\u6837\u5728\u81ea\u5df1\u7684\u8f6f\u4ef6\u4e2d\u5b9e\u73b0
\n
 \u8fd9\u4e2a\u529f\u80fd\u5462\uff1f\u95ee\u9898\u7684\u5173\u952e\u5728\u4e8e\uff1a\u5bf9\u6bcf\u4e2a\u6c49\u5b57\u5fc5\u987b\u80fd\u8ba1\u7b97\u51fa\u5b83\u7684\u62fc\u97f3\u9996\u5b57\u6bcd\u3002
\n
    GB2312\u6c49\u5b57\u7f16\u7801\u65b9\u5f0f\u4e2d\uff0c\u4e00\u7ea7\u6c49\u5b57\u76843755\u4e2a\u662f\u6309\u7167\u62fc\u97f3\u987a\u5e8f\u6392\u5217\u7684\u3002\u6211\u4eec\u53ef\u4ee5\u5229\u7528\u8fd9\u4e2a\u7279\u5f81\uff0c\u5bf9\u5e38\u7528\u6c49\u5b57\u6c42\u62fc\u97f3\u9996\u5b57\u6bcd\u3002
\n
    GB2312\u7f16\u7801\u65b9\u6848\u5bf9\u6bcf\u4e2a\u6c49\u5b57\u91c7\u7528\u4e24\u4e2a\u5b57\u8282\u8868\u793a\u3002\u7b2c\u4e00\u4e2a\u5b57\u8282\u4e3a\u533a\u53f7\uff0c\u7b2c\u4e8c\u4e2a\u5b57\u8282\u4e3a\u533a\u4e2d\u7684\u504f\u79fb\u53f7\u3002\u4e3a\u4e86\u80fd\u4e0e\u5df2\u6709\u7684ASCII\u7f16\u7801\u517c\u5bb9\uff08\u4e2d\u897f\u6587\u6df7\u6392\uff09\uff0c\u533a\u53f7\u548c
\n
 \u504f\u79fb\u7f16\u53f7\u90fd\u4ece0xA1\u5f00\u59cb\u3002
\n
    \u6211\u4eec\u53ea\u8981\u627e\u5230\u62fc\u97f3a,b,c,...x,y,z \u6bcf\u4e2a\u5b57\u6bcd\u6240\u5bf9\u5e94\u7684GB2312\u7f16\u7801\u7684\u7b2c\u4e00\u4e2a\u6c49\u5b57\uff0c\u5c31\u53ef\u4ee5\u5b9a\u4f4d\u6240\u6709\u4e00\u7ea7\u6c49\u5b57\u7684\u62fc\u97f3\u9996\u5b57\u6bcd\u4e86\uff08\u4e0d\u8003\u8651\u591a\u97f3\u5b57\u7684\u60c5\u51b5\uff09\u3002\u4e0b\u9762\u8fd9\u4e2a\u8868
\n
 \u7ed9\u51fa\u4e86\u524d\u8ff0\u4fe1\u606f\u3002\u8bf7\u4f60\u5229\u7528\u8be5\u8868\u7f16\u5199\u7a0b\u5e8f\uff0c\u6c42\u51fa\u5e38\u7528\u6c49\u5b57\u7684\u62fc\u97f3\u9996\u5b57\u6bcd\u3002\n<\/div>\n
\n a \u554a B0A1
\n
b \u82ad B0C5
\n
c \u64e6 B2C1
\n
d \u642d B4EE
\n
e \u86fe B6EA
\n
f \u53d1 B7A2
\n
g \u5676 B8C1
\n
h \u54c8 B9FE
\n
j \u51fb BBF7
\n
k \u5580 BFA6
\n
l \u5783 C0AC
\n
m \u5988 C2E8
\n
n \u62ff C4C3
\n
o \u54e6 C5B6
\n
p \u556a C5BE
\n
q \u671f C6DA
\n
r \u7136 C8BB
\n
s \u6492 C8F6
\n
t \u584c CBFA
\n
w \u6316 CDDA
\n
x \u6614 CEF4
\n
y \u538b D1B9
\n
z \u531d D4D1\n<\/div>\n
\n
\u3010\u8f93\u5165\u3001\u8f93\u51fa\u683c\u5f0f\u8981\u6c42\u3011\n<\/div>\n
\n     \u7528\u6237\u5148\u8f93\u5165\u4e00\u4e2a\u6574\u6570n (n<100)\uff0c\u8868\u793a\u63a5\u4e0b\u6765\u5c06\u6709n\u884c\u6587\u672c\u3002\u63a5\u7740\u8f93\u5165n\u884c\u4e2d\u6587\u4e32\uff08\u6bcf\u4e2a\u4e32\u4e0d\u8d85\u8fc750\u4e2a\u6c49\u5b57\uff09\u3002\n<\/div>\n
\n \u7a0b\u5e8f\u5219\u8f93\u51fan\u884c\uff0c\u6bcf\u884c\u5185\u5bb9\u4e3a\u7528\u6237\u8f93\u5165\u7684\u5bf9\u5e94\u884c\u7684\u6c49\u5b57\u7684\u62fc\u97f3\u9996\u5b57\u6bcd\u3002\n<\/div>\n
\n     \u5b57\u6bcd\u95f4\u4e0d\u7559\u7a7a\u683c\uff0c\u5168\u90e8\u4f7f\u7528\u5927\u5199\u5b57\u6bcd\u3002\n<\/div>\n
\n     \u4f8b\u5982\uff1a
\n
    \u7528\u6237\u8f93\u5165\uff1a
\n
3
\n
\u5927\u5bb6\u7231\u79d1\u5b66
\n
\u5317\u4eac\u5929\u5b89\u95e8\u5e7f\u573a
\n
\u8f6f\u4ef6\u5927\u8d5b\n<\/div>\n
\n     \u5219\u7a0b\u5e8f\u8f93\u51fa\uff1a
\n
DJAKX
\n
BJTAMGC
\n
RJDS\n<\/div>\n
\n \u3010\u6ce8\u610f\u3011\n<\/div>\n
\n     \u8bf7\u4ed4\u7ec6\u8c03\u8bd5\uff01\u60a8\u7684\u7a0b\u5e8f\u53ea\u6709\u80fd\u8fd0\u884c\u51fa\u6b63\u786e\u7ed3\u679c\u7684\u65f6\u5019\u624d\u6709\u673a\u4f1a\u5f97\u5206\uff01
\n
   
\n
    \u5728\u8bc4\u5377\u65f6\u4f7f\u7528\u7684\u8f93\u5165\u6570\u636e\u4e0e\u8bd5\u5377\u4e2d\u7ed9\u51fa\u7684\u5b9e\u4f8b\u6570\u636e\u53ef\u80fd\u662f\u4e0d\u540c\u7684\u3002\n<\/div>\n
\n     \u8bf7\u628a\u6240\u6709\u51fd\u6570\u5199\u5728\u540c\u4e00\u4e2a\u6587\u4ef6\u4e2d\uff0c\u8c03\u8bd5\u597d\u540e\uff0c\u62f7\u8d1d\u5230\u3010\u8003\u751f\u6587\u4ef6\u5939\u3011\u4e0b\u5bf9\u5e94\u9898\u53f7\u7684\u201c\u89e3\u7b54.txt\u201d\u4e2d\u5373\u53ef\u3002
\n
   
\n
    \u76f8\u5173\u7684\u5de5\u7a0b\u6587\u4ef6\u4e0d\u8981\u62f7\u5165\u3002
\n
   
\n
    \u6e90\u4ee3\u7801\u4e2d\u4e0d\u80fd\u4f7f\u7528\u8bf8\u5982\u7ed8\u56fe\u3001Win32API\u3001\u4e2d\u65ad\u8c03\u7528\u3001\u786c\u4ef6\u64cd\u4f5c\u6216\u4e0e\u64cd\u4f5c\u7cfb\u7edf\u76f8\u5173\u7684API\u3002
\n
   
\n
    \u5141\u8bb8\u4f7f\u7528STL\u7c7b\u5e93\uff0c\u4f46\u4e0d\u80fd\u4f7f\u7528MFC\u6216ATL\u7b49\u975eANSI c++\u6807\u51c6\u7684\u7c7b\u5e93\u3002\n<\/div>\n
\n     \u4f8b\u5982\uff0c\u4e0d\u80fd\u4f7f\u7528CString\u7c7b\u578b\uff08\u5c5e\u4e8eMFC\u7c7b\u5e93\uff09\uff0c\u4e0d\u80fd\u4f7f\u7528randomize, random\u51fd\u6570\uff08\u4e0d\u5c5e\u4e8eANSI C++\u6807\u51c6\uff09
\n
*\/ <\/p>\n

 \n<\/p><\/div>\n

\n #include <iostream>
\n
using std::cin;
\n
using std::cout;
\n
using std::endl;\n<\/div>\n
\n
#include <iomanip>
\n
using std::hex;\n<\/div>\n
\n
const int g_m = 10;
\n
const int g_n = 30;
\n
char ch[g_m][g_n]; <\/p>\n

char g_ch1[] = \"ABCDEFGHJKLMNOPQRSTWXYZ\";
\n
char g_ch2[] = \"\u554a\u82ad\u64e6\u642d\u86fe\u53d1\u5676\u54c8\u51fb\u5580\u5783\u5988\u62ff\u54e6\u556a\u671f\u7136\u6492\u584c\u6316\u6614\u538b\u531d\"; <\/p>\n

void Input(void);
\n
void Print(const char *);
\n
void Change(unsigned char a[]);\n<\/div>\n

\n
int main()
\n
{
\n
 Input();
\n
 return 0;
\n
} <\/p>\n

void Input(void)
\n
{
\n
 int n = 0;
\n
 cin>>n;\n<\/div>\n

\n  if(n > g_m)
\n
  return;
\n
 for(int i = 0; i < n; i++)
\n
 {
\n
  cin>>ch[i];
\n
 }\n<\/div>\n
\n  for(i = 0; i < n; i++)
\n
 {
\n
  Print(ch[i]);
\n
  cout<<endl;
\n
 }
\n
}\n<\/div>\n
\n
\/\/\u4ece\u6bcf\u4e00\u53e5\u63d0\u53d6\u51fa\u5355\u4e2a\u6c49\u5b57\uff0c\u518d\u8c03\u7528\u51fd\u6570Change()\u6765\u5904\u7406\u8fd9\u4e2a\u6c49\u5b57
\n
void Print(const char *str)
\n
{
\n
 unsigned char temp[3];\/\/\u6ce8\u610f\u5230\u4e00\u4e2a\u6c49\u5b57\u5728\u5185\u5b58\u4e2d\u662f\u4ee5\u4e24\u4e2a\u5b57\u8282\u6765\u5b58\u50a8\u7684\uff0c\u6240\u4ee5
\n
                      \/\/\u8fd9\u91cc\u89812\u4e2a\u5b57\u8282\u6765\u5b58\u653e\uff0c\u518d\u52a0\u4e0a\u4e00\u4e2a\u7a7a\u5b57\u7b26\u3002
\n
 temp[3] = '\\0';
\n
 
\n
 int length = strlen(str);
\n
\/\/ cout<<length<<endl;\n<\/div>\n
\n  for(int i = 0; i < length; i+=2)
\n
 {
\n
  for(int j = 0; j < 2; j++)
\n
  {
\n
   temp[ j] = str[i+j]; 
\n
\/\/   cout<<hex<<(temp[0]&12)<<\"    \"<<(temp[1]&127+0xA1)<<endl;
\n
  }
\n
  Change(temp);
\n
 }
\n
}\n<\/div>\n
\n
\/\/\u8f93\u51fa\u4e00\u4e2a\u6c49\u5b57\u7684\u9996\u5b57\u6bcd\uff0c\u8fd9\u91cc\u8981\u5c06\u6c49\u5b57\u7684\u4e24\u4e2a\u5b57\u8282\u62c6\u5206\u5f00\u6765\uff0c\u5e76\u4e0e\u7ed9\u5b9a\u7684\u6c49\u5b57\u7f16\u7801\u6765\u8fdb\u884c\u6bd4\u8f83
\n
void Change(unsigned char a[])
\n
{
\n
 int n = strlen(g_ch1);\n<\/div>\n
\n  \/\/\u5982\u679c\u8fd9\u4e2a\u6c49\u5b57\u62fc\u97f3\u7684\u9996\u5b57\u6bcd\u662f\u4ee5Z\u5f00\u5934\u7684
\n
 if((a[0] >= (unsigned char)(g_ch2[22*2])) && (a[1] >= (unsigned char)(g_ch2[22*2+1])))
\n
 {
\n
   cout<<g_ch1[22];
\n
   return;
\n
 }
\n
 \/\/ \u5c06\u4e00\u4e2a\u6c49\u5b57\u4e0e\u6bcf\u4e2a\u5df2\u77e5\u7f16\u7801\u7684\u6c49\u5b57\u6bd4\u8f83
\n
 for(int i = 0; i <  n; i++)
\n
 {
\n
  if(a[0] <(unsigned char)(g_ch2[i*2]) )
\n
  {
\n
   cout<<g_ch1[i-1];
\n
   break;
\n
  }\n<\/div>\n
\n   \/\/\u5982\u679c\u8fd9\u4e2a\u6c49\u5b57\u7684\u7f16\u7801\u7684\u9ad8\u5b57\u8282\u7684\u7f16\u7801\u548c\u7ed9\u51fa\u7684\u4e24\u4e2a\u6c49\u5b57\u7684\u9ad8\u8282\u5b57\u7684\u7f16\u7801\u90fd\u76f8\u540c\uff0c\u5219\u8fdb\u884c\u8fdb\u4e00\u6b65\u7684\u6bd4\u8f6f\u5224\u65ad
\n
  if((a[0] == (unsigned char)(g_ch2[i*2])) && (a[0] == (unsigned char)(g_ch2[(i+1) *2])))
\n
  {
\n
   if(a[1]<(unsigned char)(g_ch2[(i+1)*2+1]))
\n
    cout<<g_ch1[i];
\n
   else
\n
    cout<<g_ch1[i+1];
\n
   break;
\n
  }\n<\/div>\n
\n   \/\/\u5982\u679c\u53ea\u548c\u4e00\u4e2a\u7ed9\u5b9a\u7684\u6c49\u5b57\u7684\u9ad8\u5b57\u8282\u7684\u7f16\u7a0b\u76f8\u540c\uff0c\u5219\u518d\u8fdb\u884c\u8fdb\u4e00\u6b65\u7684\u6bd4\u8f83\u5224\u65ad
\n
  if(a[0] == (unsigned char)(g_ch2[i*2]))
\n
  {
\n
   if(a[1]<(unsigned char)(g_ch2[i*2+1]))
\n
    cout<<g_ch1[i-1];
\n
   else
\n
    cout<<g_ch1[i];
\n
   break;
\n
  }
\n
 }
\n
}\n<\/div>\n
\n  \n<\/div>\n
\n  \n<\/div>\n
\n \u4f5c\u8005\uff1a
\n \u62fc\u97f3\u5b57\u6bcd<\/span>\n<\/div>\n
\n  \n<\/div>\n

<\/p>\n","protected":false},"excerpt":{"rendered":"\u62fc\u97f3\u5b57\u6bcd_a o e i u 26\u4e2a\u62fc\u97f3\u5b57\u6bcd\u8868\u987a\u5e8f\/*\u9898\u76ee\u5982\u4e0b\uff1a\u3010\u7f16\u7a0b\u9898\u3011(\u6ee1\u520619\u5206)\u5728\u5f88\u591a\u8f6f\u4ef6\u4e2d\uff0c\u8f93\u5165\u62fc\u97f3\u7684\u9996\u5199\u5b57\u6bcd\u5c31\u53ef\u4ee5\u5feb\u901f\u5b9a\u4f4d\u5230...","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"_links":{"self":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts\/5817"}],"collection":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/comments?post=5817"}],"version-history":[{"count":0,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts\/5817\/revisions"}],"wp:attachment":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/media?parent=5817"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/categories?post=5817"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/tags?post=5817"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}