?? zp1808.cpp
字號:
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
//---------------------------------------------------------------------------
#pragma argsused
#include <iostream>
#include <string>
using namespace std;
int main(int argc, char* argv[])
{
int cs,s,f,t,j,i;
string st,str[100];
cs=0;
while (cin>>st)
{
s=0;
f=0;
while (st[0]!='9')
{
str[s++]=st;
if (f==0)
for (i=0;i<s-1;i++)
{
t=st.length();
if (str[i].length()<t)
t=str[i].length();
for (j=0;j<t;j++)
if (str[i][j]!=st[j])
break;
if (j==t)
{
f=1;
break;
}
}
cin>>st;
}
cout<<"Set "<<++cs;
if (f)
cout<<" is not immediately decodable"<<endl;
else
cout<<" is immediately decodable"<<endl;
}
return 0;
}
//---------------------------------------------------------------------------
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -