解题要点: 使用结构体保存准考证号,考试座位号 试机座位号作考生数组下标 通过试机座位号获取考生号,座位号 考生号使用long long存放 //课本AC代码 #include <cstdio> const int maxn = 1010; struct Student { long long id; int examSeat; } testSeat[maxn]; int main() { int n, m, seat, examSeat; long long id; scanf("…
这题比较简单,没有调试,一次通过,虽然简单,不过也有借鉴意义. #include<bits/stdc++.h> using namespace std; const int N=1005; long long code[N]; int seat[N]; void solve(){ int k; long long num; int seat1,seat2; cin>>k; for(int i=1;i<=k;i++){ cin>>num>>seat1&g…