亚洲午夜在线观看视频在线,亚洲性人人天天夜夜摸,欧美大片在线看http://m.shnenglu.com/MiYu/category/14416.html ______________白白の屋zh-cnThu, 28 Oct 2010 22:28:13 GMTThu, 28 Oct 2010 22:28:13 GMT60HDU 3082 HDOJ 3082 Simplify The Circuit ACM 3082 IN HDUhttp://m.shnenglu.com/MiYu/archive/2010/10/28/131671.htmlMiYuMiYuThu, 28 Oct 2010 14:23:00 GMThttp://m.shnenglu.com/MiYu/archive/2010/10/28/131671.htmlhttp://m.shnenglu.com/MiYu/comments/131671.htmlhttp://m.shnenglu.com/MiYu/archive/2010/10/28/131671.html#Feedback0http://m.shnenglu.com/MiYu/comments/commentRss/131671.htmlhttp://m.shnenglu.com/MiYu/services/trackbacks/131671.html

 

MiYu原創, 轉帖請注明 : 轉載自 ______________白白の屋            

 

題目地址 :

http://acm.hdu.edu.cn/showproblem.php?pid=3082

題目分析:

     沒什么特殊的方法, 簡單模擬就可以了  :

 代碼 :

代碼
/*
Mail to   : miyubai@gamil.com
My Blog   : www.baiyun.me
Link      : 
http://www.cnblogs.com/MiYu  || http://m.shnenglu.com/MiYu
Author By : MiYu
Test      : 1
Complier  : g++ mingw32-3.4.2
Program   : HDU_3082
Doc Name  : Simplify The Circuit
*/
//#pragma warning( disable:4789 )
#include <iostream>
#include 
<fstream>
#include 
<sstream>
#include 
<algorithm>
#include 
<string>
#include 
<set>
#include 
<map>
#include 
<utility>
#include 
<queue>
#include 
<stack>
#include 
<list>
#include 
<vector>
#include 
<cstdio>
#include 
<cstdlib>
#include 
<cstring>
#include 
<cmath>
#include 
<ctime>
using namespace std;
char str[110];
char *tok;
int main ()
{
    
int T;
    scanf ( 
"%d",&T );
    
while ( T -- ) {
        
int N;
        
double res = 0;
        scanf ( 
"%d"&N );
        
for ( int i = 1; i <= N; ++ i ) {
            scanf ( 
"%s", str );
            tok 
= strtok ( str, "-" );
            
int t = atoi ( tok );
            
int r = t;
            
while ( tok = strtok ( NULL, "-" ) ) {
                t 
= atoi ( tok );
                r 
+= t;
            }
            res 
+= 1.0 / r;
        }
        printf ( 
"%.2lf\n"1.0 / res );
    }
    
return 0;
}

 



MiYu 2010-10-28 22:23 發表評論
]]>
HDU 1230 HDOJ 1230 火星A+B ACM 1230 IN HDU http://m.shnenglu.com/MiYu/archive/2010/10/28/131654.htmlMiYuMiYuThu, 28 Oct 2010 11:46:00 GMThttp://m.shnenglu.com/MiYu/archive/2010/10/28/131654.htmlhttp://m.shnenglu.com/MiYu/comments/131654.htmlhttp://m.shnenglu.com/MiYu/archive/2010/10/28/131654.html#Feedback0http://m.shnenglu.com/MiYu/comments/commentRss/131654.htmlhttp://m.shnenglu.com/MiYu/services/trackbacks/131654.html

MiYu原創, 轉帖請注明 : 轉載自 ______________白白の屋    

 

 題目地址:

        http://acm.hdu.edu.cn/showproblem.php?pid=1230

題目描述:

      純粹的模擬題........

代碼:

 代碼

#include <iostream>
#include 
<string>
#include 
<algorithm>
#include 
<cstdlib>
#include 
<cstdio>
#include 
<cstring>
using namespace std;
string a, b;
int prim[40= {1,2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113};
int x[30], y[30];
int main () {
    
while ( cin >> a >> b, a != "0" && b != "0" ) {
        memset ( x, 
0sizeof(x) );
        memset ( y, 
0sizeof(y) );
        
int j = 1, k = 1;
        
for ( int i = 0; i < a.size(); ++ i ) {
            
if ( a[i] != ',' ) {
                x[j] 
= x[j] * 10 + a[i] - '0';
            } 
else {
                 
++ j;
            }
        }
        
for ( int i = 0; i < b.size(); ++ i ) {
            
if ( b[i] != ',' ) {
                y[k] 
= y[k] * 10 + b[i] - '0';
            } 
else {
                
++ k;
            }
        }
        reverse ( x
+1, x + j + 1 );
        reverse ( y
+1, y + k + 1 );
        
int f = 0;
        
int m = j;
        
int mm = k;
        
int t = 0;
        
if ( m > mm ) {
            swap ( m, mm );
            t 
= 1;
        }
        
//cout << m << " " << mm << endl;
        int z[30];
        
for ( int i = 1; i <= m; ++ i ) {
            z[i] 
= x[i] + y[i] + f;
            f 
= z[i] / prim[i];
            z[i] 
%= prim[i];
        }
        z[m
+1= 0;
        
for ( int i = m + 1; i <= mm; ++ i ) {
            
int temp = 0;
            
if ( !t ) temp = y[i];
            
else temp = x[i];
            z[i] 
= temp + f;
            f 
= z[i] / prim[i];
            z[i] 
%= prim[i];
        }
        
if ( f ) {
            z[
++mm] = f;
        }
        
for ( int i = mm; i > 0-- i ) {
            printf ( i 
== mm ? "%d" : ",%d",z[i] );
        }
        putchar ( 
10 );
    }
    
return 0;
}


MiYu 2010-10-28 19:46 發表評論
]]>
HDOJ 2526 HDU 2526 浪漫手機 ACM 2526 IN HDUhttp://m.shnenglu.com/MiYu/archive/2010/09/26/127770.htmlMiYuMiYuSun, 26 Sep 2010 08:42:00 GMThttp://m.shnenglu.com/MiYu/archive/2010/09/26/127770.htmlhttp://m.shnenglu.com/MiYu/comments/127770.htmlhttp://m.shnenglu.com/MiYu/archive/2010/09/26/127770.html#Feedback0http://m.shnenglu.com/MiYu/comments/commentRss/127770.htmlhttp://m.shnenglu.com/MiYu/services/trackbacks/127770.htmlMiYu原創, 轉帖請注明 : 轉載自 ______________白白の屋    

 

題目地址:

http://acm.hdu.edu.cn/showproblem.php?pid=2526

題目描述:

浪漫手機

Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 362    Accepted Submission(s): 150


Problem Description
最近,WisKey迷上了手機鈴聲,但是他對音律不是很懂,所以他想著能否用計算機來隨機生成鈴聲。當WisKey寫好程序后,發現生成出來的根本不是鈴聲,而是噪聲!
之后WisKey查閱了一些樂譜發現,其實很多鈴聲是以某種規律變化的,這里為了簡化這個難題,他以連續3個音符來判斷下個音符。
如有模式

在給定第一行樂譜的情況下,按模式將產生如下樂譜圖形:

我們用0表示白色格子,用1表示黑色格子。
對于沒有連續3個格子的邊緣(即沒有左邊格子或右邊格子),我們直接用白色格子代替缺少的那一個格子。
 

Input
第一行有一個整數T,代表有T組數據。
每組數據有一個整數M,表示要輸出M行樂譜。接著有8行模式串,左邊是音符模式,右邊是下一個音符。最后一行是第一行樂譜。
 

Output
輸出M行,表示M行樂譜。
 

Sample Input
1 16 111 1 110 1 101 1 100 1 011 1 010 0 001 1 000 0 0000000000000001000000000000000
 

Sample Output
0000000000000001000000000000000 0000000000000010100000000000000 0000000000000101010000000000000 0000000000001010101000000000000 0000000000010101010100000000000 0000000000101010101010000000000 0000000001010101010101000000000 0000000010101010101010100000000 0000000101010101010101010000000 0000001010101010101010101000000 0000010101010101010101010100000 0000101010101010101010101010000 0001010101010101010101010101000 0010101010101010101010101010100 0101010101010101010101010101010 1010101010101010101010101010101
 

 

題目分析 :

純水 模擬題..........      就是 由 上面 3 個 格子的 顏色 推出下面 中間那塊的 顏色.  推出來直接輸出就可以了 .

  題目開始已經給出了第一行的 顏色 , 下面的可以直接 暴力推出來  用hash很快就能判斷.

代碼如下 :

 /*

Coded By  : MiYu

Link      : http://www.cnblogs.com/MiYu  || http://m.shnenglu.com/MiYu

Author By : MiYu

Test      : 1

Program   : 2526

*/

//#pragma warning( disable:4789 )

#include <iostream>

#include <cstdio>

#include <cstring>

using namespace std;

char c[2][50];

int T,t,M;

int main(){

    char a[3],b[9];

for(int i=0;i<2;i++) c[i][0]='0';

scanf("%d",&T);

while(T--){

scanf("%d",&M);

for(int i=1;i<=8;i++){

scanf("%s",a);

int num=(a[0]-'0')*4+(a[1]-'0')*2+a[2]-'0';

scanf("%d",&t);

b[num] = '0' + t;

}

scanf("%s",&c[0][1]);

int len=strlen(&c[0][1]);

for(int i=0;i<2;i++) c[i][len+1]='0';

for(int j=0;j<M;j++){

for(int i=0;i<len;i++){

int num=(c[j%2][i]-'0')*4+(c[j%2][i+1]-'0')*2+c[j%2][i+2]-'0';

c[(j+1)%2][i+1]=b[num];

                printf("%c",c[j%2][i+1]);

}

            printf("\n");

}

}

return 0;

}


 



MiYu 2010-09-26 16:42 發表評論
]]>
HDOJ HDU 1008 Elevator ACM 1008 IN HDU http://m.shnenglu.com/MiYu/archive/2010/08/08/122705.htmlMiYuMiYuSun, 08 Aug 2010 14:21:00 GMThttp://m.shnenglu.com/MiYu/archive/2010/08/08/122705.htmlhttp://m.shnenglu.com/MiYu/comments/122705.htmlhttp://m.shnenglu.com/MiYu/archive/2010/08/08/122705.html#Feedback0http://m.shnenglu.com/MiYu/comments/commentRss/122705.htmlhttp://m.shnenglu.com/MiYu/services/trackbacks/122705.htmlMiYu原創, 轉帖請注明 : 轉載自 ______________白白の屋

題目地址:
         http://acm.hdu.edu.cn/showproblem.php?pid=1008
題目描述:
Problem Description
The highest building 
in our city has only one elevator. A request list is made up with N positive numbers. The numbers denote at which floors the elevator will stop, in specified order. It costs 6 seconds to move the elevator up one floor, and 4 seconds to move down one floor. The elevator will stay for 5 seconds at each stop.

For a given request list, you are to compute the total time spent to fulfill the requests on the list. The elevator 
is on the 0th floor at the beginning and does not have to return to the ground floor when the requests are fulfilled.
 

Input
There are multiple test cases. Each 
case contains a positive integer N, followed by N positive numbers. All the numbers in the input are less than 100. A test case with N = 0 denotes the end of input. This test case is not to be processed.
 

Output
Print the total time on a single line 
for each test case
 

Sample Input
1 2
3 2 3 1
0

又是一個水到極點的模擬............
直接代碼:
#include <iostream>
using namespace std;
int main ()
{
    
int T;
    
while ( cin >> T , T )
    {
            
int beg = 0 , stop = 0, sum = 0;
            
for ( int i = 1; i <= T; ++ i )
            {
                  cin 
>> stop;
                  
if ( stop > beg )
                  {
                       sum 
+= ( stop - beg ) * 6 + 5;
                  } 
                  
else
                  {
                       sum 
+= ( beg - stop ) * 4 + 5
                  }
                  beg 
= stop;
            } 
            cout 
<< sum << endl;
    }
    
return 0



MiYu 2010-08-08 22:21 發表評論
]]>
HDOJ HDU 1228 A + B ACM 1228 IN HDU http://m.shnenglu.com/MiYu/archive/2010/08/08/122704.htmlMiYuMiYuSun, 08 Aug 2010 14:18:00 GMThttp://m.shnenglu.com/MiYu/archive/2010/08/08/122704.htmlhttp://m.shnenglu.com/MiYu/comments/122704.htmlhttp://m.shnenglu.com/MiYu/archive/2010/08/08/122704.html#Feedback4http://m.shnenglu.com/MiYu/comments/commentRss/122704.htmlhttp://m.shnenglu.com/MiYu/services/trackbacks/122704.htmlMiYu原創, 轉帖請注明 : 轉載自 ______________白白の屋


題目地址:
         http://acm.hdu.edu.cn/showproblem.php?pid=1228
題目描述:
Problem Description
讀入兩個小于100的正整數A和B,計算A
+B.
需要注意的是:A和B的每一位數字由對應的英文單詞給出.
 

Input
測試輸入包含若干測試用例,每個測試用例占一行,格式為
"A + B =",相鄰兩字符串有一個空格間隔.當A和B同時為0時輸入結束,相應的結果不要輸出. 
 

Output
對每個測試用例輸出1行,即A
+B的值.
 

Sample Input
one 
+ two =
three four 
+ five six =
zero seven 
+ eight nine =
zero 
+ zero =
 

Sample Output
3
90
96

簡單的模擬題, 沒什么技巧
代碼如下:
MiYu原創, 轉帖請注明 : 轉載自 ______________白白の屋

#include 
<iostream>
#include 
<map>
using namespace std;
map 
< stringint > mp;
void setMap ()
{
     mp[
"one"= 1; mp["two"= 2; mp["three"= 3
     mp[
"four"= 4; mp["five"= 5; mp["six"= 6
     mp[
"seven"= 7; mp["eight"= 8; mp["nine"= 9
     mp[
"zero"= 0;  
}
int main ()
{
    setMap ();
    
string a , b, c;
    
while ( cin >> a )
    {
            cin 
>> b;
            
int sum1 = mp[a];
            
while ( b != "+" )
            {
                    sum1 
= sum1 * 10 + mp[b];
                    cin 
>> b;
            }
            cin 
>> b;
            
int sum2 = mp[b];
            cin 
>> b;
            
while ( b != "=" )
            {
                    sum2 
= sum2 * 10 + mp[b];
                    cin 
>> b;
            }
            
if ( sum1 + sum2  == 0 )
            {
                 
break
            }
            cout 
<< sum1 + sum2 << endl;
    }
    
return 0



MiYu 2010-08-08 22:18 發表評論
]]>
HDOJ HDU 1032 The 3n + 1 problem ACM 1032 IN HDU http://m.shnenglu.com/MiYu/archive/2010/08/08/122692.htmlMiYuMiYuSun, 08 Aug 2010 12:31:00 GMThttp://m.shnenglu.com/MiYu/archive/2010/08/08/122692.htmlhttp://m.shnenglu.com/MiYu/comments/122692.htmlhttp://m.shnenglu.com/MiYu/archive/2010/08/08/122692.html#Feedback1http://m.shnenglu.com/MiYu/comments/commentRss/122692.htmlhttp://m.shnenglu.com/MiYu/services/trackbacks/122692.htmlMiYu原創, 轉帖請注明 : 轉載自 ______________白白の屋

題目地址:
         http://acm.hdu.edu.cn/showproblem.php?pid=1032

水題,不解釋..........................

MiYu原創, 轉帖請注明 : 轉載自 ______________白白の屋

#include
<stdio.h>
int Length(int n)
{
     
int k=0;
     
while(n!=1)
     {
           
if(n%2==1)
                 n
=3*n+1;
           
else
                 n
/=2;
           k
++;
     }
     
return (k+1);
}
int main( )
{
     
int i,j,temp,max,t,small,large; 
     
while(scanf("%d",&i)!=EOF) 
     {
           scanf(
"%d",&j);
           
if(i<=j)
           {
            small
=i;large=j;
           }
           
else { 
                 small
=j;large=i;
                 }   
           temp
=small;
           max
=Length(temp);
           
while(temp<=large)
           {
                 t
=Length(temp);
                 
if(t>max)
                       max
=t;
                 temp
++;
           }
           printf(
"%d %d %d\n",i,j,max);
     }
     
return 0;
}


MiYu 2010-08-08 20:31 發表評論
]]>
HDOJ HDU 2053 Switch Game ACM 2053 IN HDU http://m.shnenglu.com/MiYu/archive/2010/08/07/122528.htmlMiYuMiYuSat, 07 Aug 2010 07:20:00 GMThttp://m.shnenglu.com/MiYu/archive/2010/08/07/122528.htmlhttp://m.shnenglu.com/MiYu/comments/122528.htmlhttp://m.shnenglu.com/MiYu/archive/2010/08/07/122528.html#Feedback0http://m.shnenglu.com/MiYu/comments/commentRss/122528.htmlhttp://m.shnenglu.com/MiYu/services/trackbacks/122528.html______________白白の屋

題目地址:
         http://acm.hdu.edu.cn/showproblem.php?pid=2053
題目描述:
Problem Description
There are many lamps 
in a line. All of them are off at first. A series of operations are carried out on these lamps. On the i-th operation, the lamps whose numbers are the multiple of i change the condition ( on to off and off to on ).
 

Input
Each test 
case contains only a number n ( 0< n<= 10^5in a line.
 

Output
Output the condition of the n
-th lamp after infinity operations ( 0 - off, 1 - on ).
 

Sample Input
1
5
 

Sample Output
1
0

Hint
hint
 

Consider the second test 
case:

The initial condition       : 
0 0 0 0 0 …
After the first operation  : 
1 1 1 1 1 …
After the second operation : 
1 0 1 0 1 …
After the third operation  : 
1 0 0 0 1 …
After the fourth operation : 
1 0 0 1 1 …
After the fifth operation  : 
1 0 0 1 0 …

The later operations cannot change the condition of the fifth lamp any more. So the answer 
is 0.

題目分析:
毫無疑問 , 從后面的 Consider the second test case 可以看出, 這是一道模擬題, 根據題意直接模擬即可!

代碼如下:
MiYu原創, 轉帖請注明 : 轉載自 ______________白白の屋

#include 
<iostream>
#include 
<string.h>
using namespace std;
 
int arr[100001];
 
int main()
{
    
int n;
    
while(scanf("%d"&n) != EOF)
    {
        memset(arr, 
0sizeof(arr));
        
for(int i=1; i<=n; ++i)
            
for(int j=1; j<=n&&j*i<=n; ++j)
                arr[j
*i] = !arr[j*i];
        printf(
"%d\n", arr[n]);
    }
    
return 0;
}

但是這樣非常耗時,  有沒更簡單的方法? 當然有!  在草稿紙上模擬后得出: 只要是平方數就是 "1" ,否則為"0" , 所以
直接哈希,0MS過.

代碼如下:
MiYu原創, 轉帖請注明 : 轉載自 ______________白白の屋

#include 
<iostream>
using namespace std;
int F[100001= { 11 };
int main ()
{
    
for ( int i = 2; i * i <= 100000 ; ++ i )
    {
          F[ i 
* i ] = 1;
    }
    
int N;
    
while ( cin >> N )
    {
          puts ( F[N] 
? "1" : "0" ); 
    }
    
return 0
}


MiYu 2010-08-07 15:20 發表評論
]]>
HDOJ HDU 1982 Kaitou Kid - The Phantom Thief(1) ACM 1982 IN HDU http://m.shnenglu.com/MiYu/archive/2010/08/04/122236.htmlMiYuMiYuWed, 04 Aug 2010 12:04:00 GMThttp://m.shnenglu.com/MiYu/archive/2010/08/04/122236.htmlhttp://m.shnenglu.com/MiYu/comments/122236.htmlhttp://m.shnenglu.com/MiYu/archive/2010/08/04/122236.html#Feedback1http://m.shnenglu.com/MiYu/comments/commentRss/122236.htmlhttp://m.shnenglu.com/MiYu/services/trackbacks/122236.html//MiYu原創, 轉帖請注明 : 轉載自 ______________白白の屋

題目地址 :
         http://acm.hdu.edu.cn/showproblem.php?pid=1982

PE了N次, 很糾結的一個題........  題目如下 :
Problem Description
Do you know Kaitou Kid? In the legend, Kaitou Kid is a master of disguise, and can take on the voice and form of anyone. He is not an evil person, but he is on the wrong side of the law. He's the very elusive phantom thief who never miss his prey although he always uses word puzzles to announce his targets before action.

You are the leader of a museum. Recently, you get several priceless jewels and plan to hold an exhibition. But at the moment, you receive Kid's word puzzle... Fortunately, It seems Kid doesn’t want to trouble you, and his puzzle is very easy. Just a few minutes, You have found the way to solve the puzzle:

(1) change 1 to 'A', 2 TO 'B',..,26 TO 'Z'
(2) change '#' to a blank
(3) ignore the '-' symbol, it just used to separate the numbers in the puzzle

Input
The first line of the input contains an integer C which means the number of test cases. Then C lines follow. Each line is a sentence of Kid’s word puzzle which is consisted of '0' ~ '9' , '-' and '#'. The length of each sentence is no longer than 10000.

Output
For each case, output the translated text.

Sample Input
4 9#23-9-12-12#19-20-5-1-12#1-20#12-5-1-19-20#15-14-5#10-5-23-5-12 1-14-4#12-5-1-22-5#20-8-5#13-21-19-5-21-13#9-14#20#13-9-14-21-20-5-19 1-6-20-5-18#20-8-5#15-16-5-14-9-14-7#15-6#20-8-5#5-24-8-9-2-9-20-9-15-14 7-15-15-4#12-21-3-11

Sample Output
I WILL STEAL AT LEAST ONE JEWEL AND LEAVE THE MUSEUM IN T MINUTES AFTER THE OPENING OF THE EXHIBITION GOOD LUCK


剛開始是用的庫函數 strtok 對字符串進行處理,  直接敲完,沒有出現錯誤, 提交,悲劇開始了

下面的是PE 的代碼 :
//MiYu原創, 轉帖請注明 : 轉載自 ______________白白の屋

#include 
<iostream>
#include 
<cstdlib>
#include 
<cstring>
using namespace std;
char psw[10005];
char sym[133];
void setSym ( )
{
     
int i;
     
char ch;
     
for ( ch = 'A', i = 1; i <= 26++ i , ++ ch )
     {
           sym[i] 
= ch ;
     } 

string prs ( char *psw )
{
     
string str;
     
int n = strlen ( psw );
     
int num = 0;
     
for ( int i = 0; i != n; ++ i )
     {
           
if ( psw[i] != '-' )
           {
                num 
= num * 10 + psw[i] - '0'
           } 
           
else 
           {
                
if ( num != 0 )
                {
                     str 
+= sym[num];
                }
                num 
= 0
           }
     }
     
if ( num != 0 )
     {
          str 
+= sym[num];
     }
     
return str;
}
int main ()
{
    setSym ();
    
int T;
    
while ( scanf ( "%d\n",&T ) != EOF )
    {
            
while ( T -- )
            {
                    gets ( psw );
                    
string str;
                    
char *ptr = strtok ( psw, "#" );
                    
if ( strlen ( ptr ) != 0 )
                         str 
= prs ( ptr ); 
                    
while ( ptr = strtok ( NULL, "#" ) )
                    {
                           
if ( strcmp ( ptr, "" ) != 0 )
                           {
                                str 
+= " ";
                                str 
+= prs ( ptr ); 
                           }
                    }
                    cout 
<< str << endl;; 
            }           
    }
    
return 0
}

 最后在Ambition 大牛的提示下,成功AC, 因為strtok是忽視被截字符串的個數的 "-----######---##-#-#"
這組數據應該輸出10個空格, 而我的代碼值能輸出3個.
下面的是AC代碼 :
//MiYu原創, 轉帖請注明 : 轉載自 ______________白白の屋

#include 
<iostream>
#include 
<cstdlib>
#include 
<cstring>
using namespace std;
char psw[20005];
char temp[20005];
char sym[133];
void setSym ( )
{
     
int i;
     
char ch;
     
for ( ch = 'A', i = 1; i <= 26++ i , ++ ch )
     {
           sym[i] 
= ch ;
     } 

string prs ( char *psw )
{
     
string str;
     
int n = strlen ( psw );
     
int num = 0;
     
for ( int i = 0; i != n; ++ i )
     {
           
if ( psw[i] != '-' )
           {
                num 
= num * 10 + psw[i] - '0'
           } 
           
else 
           {
                
if ( num != 0 )
                {
                     str 
+= sym[num];
                }
                num 
= 0
           }
     }
     
if ( num != 0 )
     {
          str 
+= sym[num];
     }
     
return str;
}
int main ()
{
    setSym ();
    
int T;
    
while ( scanf ( "%d",&T ) != EOF )
    {
            getchar ();
            
while ( T -- )
            {
                    gets ( psw );
                    
int len = strlen ( psw );
                    
int beg = 0;
                    memset ( temp, 
'\0'sizeof ( temp ) );
                    
string str;
                    
while ( psw[beg] != '\0' )
                    {
                           
int i = 0
                           
while ( psw[beg] != '#' && psw[beg] != '\0' )
                           {
                                   temp[i
++= psw[beg++]; 
                           }
                           temp[i] 
= '\0';
                           
string t = prs ( temp );
                           
if ( t.size() != 0 )
                           {
                                str 
+= t;
                                
if ( psw[beg] == '#' )
                                {
                                     str 
+= " "
                                }  
                           }
                           
else if ( psw[beg] == '#' )
                           {
                                str 
+= " "
                           }
                           beg 
++;
                    }
                    cout 
<< str << endl;
                    memset ( psw, 
'\0'sizeof ( psw ) );
            }           
    }
    
return 0
}

弄了一個下午加一個晚上才 AC , 是自己把簡單問題想太復雜了............
Roowe 神牛代碼 :
//MiYu原創, 轉帖請注明 : 轉載自 ______________白白の屋

#include 
<iostream>
#include 
<stdio.h>
#include 
<string.h>
#include 
<ctype.h>
using namespace std;
char str[27]={"ABCDEFGHIJKLMNOPQRSTUVWXYZ"};
char s[10001];
int main()
{
    
int T,len,i,num;
    scanf(
"%d",&T);
    getchar();
    
while(T--)
    {
        gets(s);
        len
=strlen(s);
        
for(i=0;i<len;i++)
        {
            
if(isdigit(s[i]) && isdigit(s[i+1]))
            {
                num
=10*(s[i]-'0')+s[i+1]-'0';
                printf(
"%c",str[num-1]);
                i
++;
                
continue;
            }
            
if(isdigit(s[i]) && !isdigit(s[i+1]))
            {
                num
=s[i]-'0';
                printf(
"%c",str[num-1]);
                
continue;
            }
            
if(s[i]=='#')   printf(" ");
        }
        printf(
"\n");
    }
    
return 0;
}


MiYu 2010-08-04 20:04 發表評論
]]>
HDOJ HDU 1088 Write a simple HTML Browser ACM 1088 IN HDU http://m.shnenglu.com/MiYu/archive/2010/08/04/122201.htmlMiYuMiYuWed, 04 Aug 2010 06:07:00 GMThttp://m.shnenglu.com/MiYu/archive/2010/08/04/122201.htmlhttp://m.shnenglu.com/MiYu/comments/122201.htmlhttp://m.shnenglu.com/MiYu/archive/2010/08/04/122201.html#Feedback0http://m.shnenglu.com/MiYu/comments/commentRss/122201.htmlhttp://m.shnenglu.com/MiYu/services/trackbacks/122201.html//MiYu原創, 轉帖請注明 : 轉載自 ______________白白の屋

題目地址 :
      http://acm.hdu.edu.cn/showproblem.php?pid=1088
      模擬HTML 語言...............
標準的模擬題..............PE了好久, 終于A 了
代碼如下 :
//MiYu原創, 轉帖請注明 : 轉載自 ______________白白の屋

#include<iostream>
#include 
<string>
using namespace std;
string hr = "--------------------------------------------------------------------------------";
int main()
{
    
string str, str1;
    
int count = 0;
    
while ( cin >> str )
    
{
        
int len = str.size ();
        
if ( str == "<br>" )
        
{
             cout 
<< endl;
             count 
=0;
        }

        
else if ( str == "<hr>" )
        
{
            
if ( count )
            
{
                 cout 
<< endl; 
            }

            cout 
<< hr << endl;
            count 
= 0;
        }

        
else
        
{
            
if ( count + len + 1 <= 80 ) 
            
{
                
if ( count )
                
{
                     cout 
<< " ";
                     count 
++;
                }

                cout 
<< str;
                count 
+= len;
            }

            
else
            
{
                cout 
<< endl;
                count 
= len;
                cout 
<< str;
            }

        }

    }

    cout 
<< endl;
    
return 0;
}



MiYu 2010-08-04 14:07 發表評論
]]>
青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            欧美精品v日韩精品v国产精品 | 欧美午夜精品久久久久久人妖| 国产精品视频一区二区高潮| 午夜国产欧美理论在线播放| 国色天香一区二区| 亚洲精品视频在线| 欧美成人午夜剧场免费观看| 久久精品综合一区| 久久黄金**| 国产精品jizz在线观看美国 | 久久久久综合| 久久青青草综合| 亚洲国产成人在线| 午夜一区二区三区不卡视频| 亚洲欧美不卡| 香蕉久久一区二区不卡无毒影院| 午夜亚洲视频| 99精品视频免费观看视频| 久久不射2019中文字幕| 欧美日韩国产一区二区| 久久国产福利| 亚洲第一在线视频| 亚洲精品美女在线观看| 久久人人97超碰国产公开结果| 日韩小视频在线观看| 亚洲色在线视频| 91久久中文| 亚洲欧美一级二级三级| 国产日韩欧美一区二区三区在线观看| 亚洲国产精品成人| 亚洲精品一区二区三区蜜桃久| 欧美一区二区视频网站| 亚洲图片在区色| 午夜在线精品| 欧美精品乱码久久久久久按摩| 久久国产日本精品| 欧美一区二区精品| 欧美成人自拍视频| 亚洲国产高清aⅴ视频| 先锋影院在线亚洲| 欧美激情综合| 亚洲午夜精品17c| 欧美.www| 午夜久久久久久| 国产精品亚洲一区| 久热这里只精品99re8久| 国产精品夜夜夜| 久久综合久久久| 一本色道久久综合狠狠躁篇的优点| 欧美性做爰毛片| 欧美伊人久久久久久午夜久久久久 | 一区二区三区 在线观看视| 亚洲精品久久久久久久久久久| 好看的av在线不卡观看| 欧美午夜免费电影| 欧美精品免费在线观看| 欧美国产亚洲另类动漫| 亚洲国产高清在线| 欧美视频在线一区二区三区| 欧美高清在线精品一区| 久久人人97超碰精品888| 欧美日韩二区三区| 亚洲精品综合精品自拍| 午夜视频久久久| 亚洲免费精彩视频| 亚洲日本无吗高清不卡| 久久综合给合| 欧美在线播放一区| 亚洲高清在线| 这里只有精品电影| 欧美午夜免费影院| 亚洲国产综合在线| 狠狠噜噜久久| 欧美高清不卡在线| 黄色影院成人| 欧美午夜片在线观看| 欧美国产另类| 国产精品免费视频xxxx| 亚洲性视频网址| 欧美成人午夜激情视频| 亚洲精品无人区| 国产日韩欧美精品| 亚洲欧美自拍偷拍| 美日韩精品免费| 伊人久久综合97精品| 亚洲欧美www| 欧美激情综合五月色丁香| 一区二区高清| 亚洲综合导航| 国产精品专区第二| 国产精品久久久久久久一区探花| 国产视频精品网| 久久久久高清| 亚洲精品小视频在线观看| 蜜臀av在线播放一区二区三区| 激情成人综合| 亚洲国产精品成人va在线观看| 欧美国产视频一区二区| 欧美精品福利视频| 午夜精品亚洲一区二区三区嫩草| 亚欧成人在线| 日韩天堂在线视频| 欧美成人精品高清在线播放| 亚洲视屏在线播放| 狠狠色狠狠色综合人人| 亚洲福利一区| 国产精品一区二区久久久| 欧美99在线视频观看| 国产精品久久久久毛片软件 | 亚洲欧美日韩国产中文在线| 激情欧美丁香| 亚洲午夜精品一区二区三区他趣| 在线观看欧美视频| 午夜精品久久久久久久白皮肤| 亚洲精品少妇| 久久久久国产一区二区三区| 亚洲欧美国产日韩天堂区| 欧美 日韩 国产 一区| 欧美一区二区啪啪| 亚洲欧美日韩成人高清在线一区| 亚洲国产一区二区三区在线播| 亚洲永久免费av| 国产农村妇女精品一区二区| 久久精品二区亚洲w码| 欧美影视一区| 欧美一级淫片播放口| 欧美人妖在线观看| 午夜欧美精品久久久久久久| 欧美激情精品久久久久久蜜臀| 美乳少妇欧美精品| 欧美日本精品| 亚洲国产成人久久综合| 永久91嫩草亚洲精品人人| 亚洲欧美激情诱惑| 午夜精品久久久久久久蜜桃app| 欧美理论电影在线观看| 亚洲成人在线网| 欧美午夜性色大片在线观看| 欧美激情女人20p| 在线日韩中文字幕| 91久久亚洲| 亚洲乱码久久| 欧美国产欧美综合| 欧美黄色网络| 99www免费人成精品| 欧美激情综合色| 亚洲精品女人| 亚洲国产高清自拍| 欧美freesex8一10精品| 亚洲承认在线| 一本色道久久综合亚洲精品婷婷 | 亚洲国产精品电影| 亚洲精品视频免费在线观看| 欧美承认网站| 亚洲免费电影在线| 香蕉久久一区二区不卡无毒影院 | 国产精品一区免费视频| 性欧美长视频| 欧美成人首页| 一本色道88久久加勒比精品| 国产精品99免视看9| 亚洲资源av| 欧美成人午夜77777| 一本大道久久精品懂色aⅴ| 欧美色图首页| 久久久99国产精品免费| 亚洲三级毛片| 久久精品欧美日韩| 亚洲精品在线三区| 国产精品香蕉在线观看| 久久日韩精品| 亚洲视频图片小说| 欧美成年人网站| 亚洲一级在线| 永久久久久久| 国产精品久久久久久妇女6080 | 欧美精品一区二区在线观看| 亚洲淫片在线视频| 欧美高清视频在线观看| 亚洲一区国产| 国产精品久久一区二区三区| 久久丁香综合五月国产三级网站| 欧美高清影院| 欧美一区二区在线| 日韩视频在线一区二区| 国产欧美精品国产国产专区| 欧美成人一区二区三区片免费| 亚洲一区二区三区视频| 欧美国产专区| 久久精品免费播放| 亚洲免费影院| 洋洋av久久久久久久一区| 狠狠色丁香婷婷综合影院| 欧美日韩一区在线观看| 日韩午夜免费视频| 免费亚洲网站| 久久国产欧美日韩精品| 亚洲永久免费视频| 一本色道久久综合亚洲精品按摩| 久久久噜噜噜久噜久久|