X A B (第二季水)

2021-09-07 05:39:48 字數 1187 閱讀 6525

description

give you two numbers a and b, if a is equal to b, you should print "yes", or print "no".       

input

each test case contains two numbers a and b.        

output

for each case, if a is equal to b, you should print "yes", or print "no".       

sample input

1 2 2 2 3 3 4 3

sample output

no yes yes no

這個題神坑!!!

開始我寫的**考慮到數字前面多餘的0和後面多餘的0以及小數點

依舊是 結果錯誤!!!

最後發現不用考慮數字前面多餘的0,出題的bug!!!   只需考慮小數點及其後末尾多餘的0

以下為考慮全面的**

#include#include

using

namespace

std;

char a[20000],b[20000

];void f(char

s) n--;

}else

break

; }

if(strchr(s,'.'

))

else

break

; }

}if(s[n-1]=='

.')s[n-1]='\0'

;}intmain()

return0;

}

以下為ac**

#include#include

using

namespace

std;

char a[20000],b[20000

];void f(char

s)

else

break

; }

}if(s[n-1]=='

.')s[n-1]='\0'

;}intmain()

return0;

}

Java 基礎(第二季)

public class helloworld public class helloworld int num1 int num2 初始化塊 static public static void main string args 結果如下 通過靜態初始化塊為靜態變數num3賦值 通過初始化塊為變數nu...

遷移填坑第二季

之前說到,配置了遷移環境碰到了各種坑,然後終於解決掉了,終於能夠nova live migration kobe compute5了。然後就開始批量生產遷移環境,然後。之前是只用了compute3和compute5,然後把compute6和compute7也配置好nfs和libvirt,然後嘗試把k...

Spark效能優化第二季

一 task效能優化 1,慢任務 資料傾斜或機器故障 的效能優化 可以考慮減少每個partition處理的資料量,同時建議開啟spark.speculation 2,儘量減少shuffle,例如我們要減少groupbykey的操作,因為groupbykey會要求通過網路拷貝 shuffle 所有的資...