欢乐纪中某B组赛【2019.1.18】

版权声明:原创,未经作者允许禁止转载 https://blog.csdn.net/Mr_wuyongcong/article/details/86541531

前言

新年新气象,我们又一度迎来新一年的模拟赛(谁想迎来)
总之,有来到了熟悉的地方——纪中。


成绩

R a n k Rank 是有算别人的

R a n k Rank P e r s o n Person S c o r e Score A A B B C C D D
2 2 2017 m y s e l f 2017myself 300 300 100 100 100 100 100 100 0 0
4 4 2017 z y c 2017zyc 270 270 100 100 100 100 70 70 0 0
5 5 2017 x x y 2017xxy 260 260 100 100 100 100 55 55 5 5
6 6 2017 x j q 2017xjq 240 240 100 100 100 100 40 40 0 0
8 8 2017 l r z 2017lrz 205 205 100 100 100 100 5 5 0 0
10 10 2017 h z b 2017hzb 200 200 100 100 100 100 0 0 0 0
19 19 2017 h j q 2017hjq 160 160 100 100 60 60 0 0 0 0
31 31 2017 l w 2017lw 100 100 100 100 0 0 0 0 0 0

正题


T 1 : P 1313 , j z o j 3027 T1:P1313,jzoj3027- 计算系数【组合数,二项式定理】

之前做过,就直接放了
博客链接:
https://blog.csdn.net/Mr_wuyongcong/article/details/82502479


T 2 : P 1311 , j z o j 3025 T2:P1311,jzoj3025- 选择客栈【统计】

博客链接:
https://blog.csdn.net/Mr_wuyongcong/article/details/86540567


T 3 : P 1314 , j z o j 3028 T3:P1314,jzoj3028- 聪明的质监员【二分答案 , , 前缀和】

博客链接:
https://blog.csdn.net/Mr_wuyongcong/article/details/86540688


T 4 : P 1315 , j z o j 3029 T4:P1315,jzoj3029- 观光公交【费用流】

博客链接:
https://blog.csdn.net/Mr_wuyongcong/article/details/86541082


s o m e   o f   c o d e some\ of\ code


T2 随机数据

#include<cstdio>
#include<cstdlib>
#include<ctime>
#define random(x) rand()%x
using namespace std;
int main()
{
	srand(time(0));
	//freopen("data.in","w",stdout);
	printf("10 3 %d\n",random(10));
	for(int i=1;i<=10;i++)
	  printf("%d %d\n",random(3),random(10));
}

T2 60分暴力

#include<cstdio>
#include<cctype>
#define ll long long
using namespace std;
int read() {
	int x=0,f=1; char c=getchar();
	while(!isdigit(c)) {if(c=='-')f=-f;c=getchar();}
	while(isdigit(c)) x=(x<<1)+(x<<3)+c-48,c=getchar();
	return x*f;
}
void print(int x){
	if (x>9) print(x/10); putchar(x%10+48); return;
}
ll n,k,p,color[5000],cost[5000],ans;
int main()
{
	freopen("data.in","r",stdin);
	freopen("data.ans","w",stdout);
	n=read();k=read();p=read();
	for(ll i=1;i<=n;i++){
		color[i]=read();cost[i]=read();
	}
	for(int i=1;i<=n;i++)
	  for(int j=i+1;j<=n;j++){
	  	if(color[i]==color[j]){
	  		for(int k=i;k<=j;k++)
	  		  if(cost[k]<=p){
	  		  	ans++;
	  		  	break;
			  }
		  }
	  }
	print(ans);
}

T2 对拍

#include<windows.h>
#include<cstdio>
using namespace std;
int main()
{
	while(1){
		system("data.exe");
		system("BL.exe");
		system("T2.exe");
		if(!system("fc data.ans data.out"))
		  printf("AC\n");
		else
		{
			printf("WA\n");
			break;
		}
	}
}

尾声

新年快乐

猜你喜欢

转载自blog.csdn.net/Mr_wuyongcong/article/details/86541531
今日推荐