如何导出CCF的一等名单
  • 板块学术版
  • 楼主CuSO4_and_5H2O
  • 当前回复15
  • 已保存回复15
  • 发布时间2022/12/19 10:24
  • 上次更新2023/10/24 07:14:23
查看原帖
如何导出CCF的一等名单
231946
CuSO4_and_5H2O楼主2022/12/19 10:24

RT,想看看SD的,但是导不出来,写了个代码结果发现字符串几乎不会/kel

CCF名单

或者看看为什么这个代码判断不了 a=="山东".

#include<bits/stdc++.h>
#define max(A,B) (A<B?B:A)
#define min(A,B) (A>B?B:A)
#define bug cout<<"I AK IOI"<<endl;
#define gc getchar
using namespace std;
const int N=1e5+1;

inline void print(int x) {if (x < 0) putchar('-'), x = -x; if(x > 9) print(x / 10); putchar(x % 10 + '0');}
inline int read(){int res = 0, f = 0; char ch = gc();for(; !isdigit(ch); ch = gc()) f |= (ch == '-'); for(;isdigit(ch);ch=gc()) res = (res << 1) + (res << 3) + (ch ^ '0');return f ? -res :res;}

int qwq;

signed main(){
	freopen("qwq.txt","r",stdin);
	freopen("out.txt","w",stdout);
	string a;
	for(int i=1;i<=6;i++){
		int jis=0;
		for(int j=1;j<=10;j++){
			a="";
			cin>>a;
			if(a=="山东") {	
				jis++;
			}
			if(j==6 && a[0]>='1' && a[1]>='2' && a[2]>='3' ) jis++;
			if(j==8 && a=="高一") jis++;
		}
		if(jis==3) qwq++;
		cout<<jis<<'\n';
	}
	cout<<qwq;
}
2022/12/19 10:24
加载中...