题目
思路
这题考的其实不难,关键点是学生答案的输入用()来分隔每一道题。用cin就只能用string保存,再遍历判断,非常麻烦。
说实话,我非常不喜欢用scanf,直到这题教我做人……scanf对于要求格式的输入,真香!
代码参考自秦神
AC代码
#include<bits/stdc++.h>
using namespace std;
struct test{
int score;
int ans;
int right;
string rans;
};
int main(){
int n,m; cin>>n>>m;
test a[m];
for(int i