求助
查看原帖
求助
1300391
Nobel楼主2024/7/2 15:05
#include <iostream>
using namespace std;
int main()
{
	int n ;
	string z1 , z2 , z ;
	int cnt = 0 ;
	cin >> z ;
	cin >> n ;
	for( int i = 1 ; i <= n ; i ++ )
	{
		cin >> z1 >> z2 ;
		if( z1 != z && z2 == z )
		{
			z = z1 ;
			cnt ++ ;
		}
		
	} 
	cout << z << endl << cnt ;
	return 0;
}

谁能帮我看看为什么只拿了26分

2024/7/2 15:05
加载中...