PTA 7-15 PAT Judge (25 分)

本文深入探讨了PAT(Pacific Asia Test for Schools)Judge在线评测系统,包括其工作原理、提交流程、错误类型分析以及如何通过实践提升解题效率。无论你是初次接触PTA还是希望提高编程能力,此篇内容都将为你提供宝贵的指导。
摘要由CSDN通过智能技术生成
#include <bits/stdc++.h>
using namespace std;
typedef struct{
	int id, flag = 0, cnt = 0, sum = 0;
	vector<int> marks;
}stu;
//int cmp(stu a, stu b);
int cmp(int a, int b);
vector<stu> students(10005);
int main()
{
	#ifdef ONLINE_JUDGE
	#else
	freopen("in.txt", "r", stdin);
	#endif
	int N, K, M, rank = 0, last = -1;
	cin >> N >> K >> M;
	vector<int> score(K+1);
	int i, j;
	for(i = 1; i <= K; i++){
		cin >> score[i];
	}
	//vector<stu> students(N + 1); //做了修改
	vector<int> stuid(N + 1);
	for(i = 0; i <= N; i++){     //做了修改
		students[i].id = i;
		students[i].marks.resize(K + 1, -1); //做了修改
		stuid[i]=i+1;
	}

	for(i = 0; i < M; i++){
		int tmpid, tmp, tmpscore;
		cin >> tmpid >> tmp >> tmpscore;
		//scanf("%d%d%d",&tmpid,&tmp,&tmpscore);

		if(students[tmpid]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值