通過檢測
通過檢測
您的答案為: 100% ???
正確答案為: 0% ???
通過檢測
------------------------------------------------------------
請高手指點
#include <iostream>
#include <string.h>
#include <map>
using namespace std;
map<string,int> M,A,R;
map<string,int>::iterator it;
//=======================================
int main() {
int n,AC,SG;
char a[35],b[5];
cin>>n;
M.clear();
R.clear(); //秒殺人數
A.clear(); //AC人數
while(n--){
scanf("%s %s",a,b);
if(strcmp(b,"AC")==0 && M.find(a)==M.end())
R[a]=1; //第一次較就AC
M[a]++;
if(strcmp(b,"AC")==0) A[a]=1;
}
SG=R.size(); AC=A.size();
printf("%.0f%%\n",100.0*SG/AC);
}
請注意輸入說明有提到「此處的解題紀錄"排在前面"的資料代表時間"越晚"」,
你的程式則是將"排在前面"的視為"越早"的紀錄。
希望有幫助到你~ OwO
請注意輸入說明有提到「此處的解題紀錄"排在前面"的資料代表時間"越晚"」,
你的程式則是將"排在前面"的視為"越早"的紀錄。
希望有幫助到你~ OwO
你太厲害了! 感謝!!! ^==========================^