错误大全(你可能“通过”了洛谷样例,但是无法通过此题)
查看原帖
错误大全(你可能“通过”了洛谷样例,但是无法通过此题)
145994
耶梦加得楼主2021/11/24 07:11
  1. Welcome 语句之后有额外的换行!
  2. 打印完菜单也有换行!

亦即

cout << "Welcome to Student Performance Management System (SPMS)." << endl;
    cout << endl; //
    cout << "1 - Add" << endl;
    cout << "2 - Remove" << endl;
    cout << "3 - Query" << endl;
    cout << "4 - Show ranking" << endl;
    cout << "5 - Show Statistics" << endl;
    cout << "0 - Exit" << endl;
    cout << endl; /这两个endl是洛谷样例没有给出的

3.每门学科之后都有换行,包括 overall 部分输出完也要换行

	//...
    cout << "Chinese" << endl;
    //...
    cout << endl;
    cout << "Mathematics" << endl;
    //...
    cout << endl;
    cout << "English" << endl;
    //...
    cout << endl;
	cout << "Programming" << endl;
    //...
    cout << endl;
    cout << "Overall:" << endl;
	//另外注意这个冒号
    //...
    cout << endl;
  1. Show ranking 操作时的分隔符是英文分隔符!!!样例中给出的是中文分隔符!(所以复制会WA)

(如果还有其他遗漏的欢迎补充)

2021/11/24 07:11
加载中...