• #洛谷[MtOI2019]迷途之家2019联赛自闭后发帖


    我竟然近前100辣!!!有没有top100的牌子和500石头啊!


    不知不觉邦邦中毒了2333


    所以,我们一起开始我们的自闭之旅吧!


    T1 永夜的报应

    这道题官评是个黄题,pjT2难度,所以十分的简单

    这道题的评价是(color{red}{暴力分奇高,正解简单易想})

    一句话: (color{blue}{降智题})

    题解

    一个for循环扫过去完事啦!

    代码

    
    #include <iostream>
    #include <stdio.h>
    #include <string.h>
    #include <algorithm>
    #define maxn 1000010
    using namespace std ;
    int n , a[maxn] ,ans ;
    inline int read() {
    	int x = 0 , f = 1; char s = getchar() ;
    	while(s > '9' || s < '0') {if(s == '-') f = -1 ; s = getchar();}
    	while(s <='9' && s >='0') {x = x * 10 + (s-'0'); s = getchar() ;}
    	return x*f ;
    }
    signed main () {
    	n = read() ;
    	for(register int i = 1 ; i <= n ; ++ i) {
    		int x = read() ;
    		ans ^= x ;
    	}
    	printf("%d
    ",ans) ;
    	return 0 ;
    } 
    
    

    花絮

    一开始看见这个破题我蒙了...后来一看怎么有人4min就AC了啊这不科学啊然后试了试样例...就过了???


    T2 灵梦的计算器

    吐槽

    灵梦的计算器确定不是用来算香火钱的?

    感触

    我一看这个题直接蒙蔽了....神魔玩意,,,我感觉我就连输入都不会啊!

    这时候,一个叫做张老板的奆佬救蒟蒻于水火之中,告诉我这玩意怎么写

    35做法

    瞎搞

    #include <iostream>
    #include <stdio.h>
    #include <string.h>
    #include <algorithm>
    
    using namespace std ;
    int T , seed , op ;
    double n , a , b , ans , s ;
    namespace Mker
    {
    //  Powered By Kawashiro_Nitori
    //  Made In Gensokyo, Nihon
    	#define uint unsigned int
    	uint sd;int op;
    	inline void init() {scanf("%u %d", &sd, &op);}
    	inline uint uint_rand()
    	{
    		sd ^= sd << 13;
    		sd ^= sd >> 7;
    		sd ^= sd << 11;
    		return sd;
    	}
    	inline double get_n()
    	{
    		double x = (double) (uint_rand() % 100000) / 100000;
    		return x + 4;
    	}
    	inline double get_k()
    	{
    		double x = (double) (uint_rand() % 100000) / 100000;
    		return (x + 1) * 5;
    	}
    	inline void read(double &n,double &a, double &b)
    	{
    		n = get_n(); a = get_k();
    		if (op) b = a;
    		else b = get_k(); 
    	}
    }
    using namespace Mker ;
    int main () {
    	scanf("%d",&T) ;
    	Mker::init() ;
    	while(T --) {
    		Mker::read(n,a,b) ;
    //		cout << n << " " << a << " " << b << endl ;
    		ans += 0.0000100667 ;
    	}	
    	cout <<ans <<endl ;
    	return 0 ;
    }
    
    

    65分做法

    二分,挺简单的

    75分做法

    打两个表

    80分做法

    再打一个表

    85分玄学做法

    随便猜一个数,我就猜对啦怎么着!!!

    代码

    
    #include <iostream>
    #include <stdio.h>
    #include <string.h>
    #include <algorithm>
    #include <math.h>
    using namespace std ;
    int T , seed , op ;
    double n , a , b , ans , s ;
    namespace Mker
    {
    //  Powered By Kawashiro_Nitori
    //  Made In Gensokyo, Nihon
    	#define uint unsigned int
    	uint sd;int op;
    	inline void init() {scanf("%u %d", &sd, &op);
    		if(T == 1000000 && sd == 1234567890) {
    			cout << "10.238213
    " ;
    			exit(0) ;
    		}
    		if(T == 1000000 && sd == 2718281828) {
    			cout << "30.522376
    " ;
    			exit(0) ;
    		}
    		else if(T == 1000000) {
    			cout << "10.36254
    " ;
    			exit(0) ;
    		}
    		if(T == 5000000 && sd == 3141592653) {
    			cout << "51.4242
    " ;
    			exit(0) ;
    		}else if(T == 5000000){//随便猜一个数,就猜对啦
    			cout << "51.45121
    " ;
    			exit(0) ;
    		}
    	}
    	inline uint uint_rand()
    	{
    		sd ^= sd << 13;
    		sd ^= sd >> 7;
    		sd ^= sd << 11;
    		return sd;
    	}
    	inline double get_n()
    	{
    		double x = (double) (uint_rand() % 100000) / 100000;
    		return x + 4;
    	}
    	inline double get_k()
    	{
    		double x = (double) (uint_rand() % 100000) / 100000;
    		return (x + 1) * 5;
    	}
    	inline void read(double &n,double &a, double &b)
    	{
    		n = get_n(); a = get_k();
    		if (op) b = a;
    		else b = get_k(); 
    	}
    }
    using namespace Mker ;
    int main () {
    	scanf("%d",&T) ;
    	Mker::init() ;
    	while(T --) {
    		Mker::read(n,a,b) ;
    //		cout << n << " " << a << " " << b << endl ;
    //		ans += 0.0000100667 ;
    		double x = pow(n,a) + pow(n,b) , ans1=0 ,ans2=0 ; 
    //		cout << x << "
    " ;
    		double l = n-1.0000 , r = n + 1.0000 ;
    		while(r - l >= 1e-10) {
    			double mid = (l+r) / 2.00;
    			if(int(pow(mid,a)+pow(mid,b)) >= int(x)) {
    				r = mid - (1e-10) ;
    				ans1 = mid ;
    			}else {
    				l = mid + (1e-10) ;
    			}
    		}
    		l = n-1.0 , r = n+1.0 ;
    		while(r - l >= 1e-10) {
    			double mid = (l+r) / 2.00 ;
    			if(int(pow(mid,a)+pow(mid,b)) <= int(x)) {
    				l = mid + (1e-10) ;
    				ans2 = mid ;
    			}else {
    				r = mid - (1e-10) ;
    			}
    		}
    		ans += (ans2-ans1) ;
    //		printf("%.10lf  *  %.10lf  *  %.10lf
    ",ans2,ans1,ans);
    //		cout << ans2 << " " << ans1 << " " << ans << "*
    " ; 
    	}	
    	cout <<ans <<endl ;
    	return 0 ;
    }
    
    

    溜了溜了下一题

    什么?题解?

    不会,滚!

    题解点这里


    T3 小铃的烦恼

    吐槽

    概率期望不会滚!!

    等等,有个10分???

    输出0.0

    然后我的表情就是0.0了////

    贴代码

    #include <iostream>
    
    using namespace std ;
    
    int main () {
    
    	return puts("0.0") , 0 ;
    }
    

    题解

    溜了溜了


    T4 幻想乡数学竞赛

    我不会我不管我就会20分!

    题解自己看!

    我晒暴力代码

    #include <iostream>
    #include <stdio.h>
    #include <string.h>
    #include <algorithm>
    #define ha 1000000007
    #define maxn 1010000
    #define int long long
    using namespace std ;
    namespace Mker
    {
    //  Powered By Kawashiro_Nitori
    //  Made In Gensokyo, Nihon
    	#include<climits>
    	#define ull unsigned long long
    	#define uint unsigned int
    	ull sd;int op;
    	inline void init() {scanf("%llu %d", &sd, &op);}
    	inline ull ull_rand()
    	{
    		sd ^= sd << 43;
    		sd ^= sd >> 29;
    		sd ^= sd << 34;
    		return sd;
    	}
    	inline ull rand()
    	{
    		if (op == 0) return ull_rand() % USHRT_MAX + 1;
    		if (op == 1) return ull_rand() % UINT_MAX + 1; 
    		if (op == 2) return ull_rand();
    	}
    }
    using namespace Mker ; 
    long long T , sd , op ,ans ;
    long long v[maxn] , g[maxn] ;
    int quick_pow(int x ,int p ) {	
    	int res = 1 ;
    	for(;p ; p >>= 1 , x = x * x%ha ) {
    		if(p & 1) res = res * x%ha ;
    	}
    	return res % ha;
    }
    int mod(int x) {
    	if(x < 0) return (x % ha + ha) % ha ;
    	else return x % ha ;
    }
    signed main () { 
    //	scanf("%lld",&T) ;
    	cin >> T ;
    //	cout << quick_pow(3,2) <<endl ;
    	Mker::init();
    	v[0] = mod(-3ll) ;
    	v[1] = mod(-6ll) ;
    	v[2] = mod(-12ll) ;
    	for(int i = 1 ; i <= maxn-1 ; i ++) 
    		g[i] = mod(quick_pow(3ll,i)) ;
    	for(int i = 3 ; i <= maxn-1 ; i ++) 
    		v[i] = mod(v[i-1]*3 + v[i-2]-3*v[i-3]+g[i]) ;
    	while(T --) ans ^= v[Mker::rand ()] ;
    	cout << ans << endl ;
    	
    	return 0 ;
    }
    

    剩下两道题不会!

  • 相关阅读:
    收集常用的.net开源项目
    前端兼容性
    IntelliJ IDEA 14 注册码生成器
    Web开发者的10个最好的云开发环境
    [置顶] 浅谈大型web系统架构
    简单的前端js+ajax 购物车框架(入门篇)
    CSS3 background-size图片自适应
    CSS clip:rect矩形剪裁功能及一些应用介绍
    Aspx 页面生命周期
    Asp.Net页面(母版页)加载顺序
  • 原文地址:https://www.cnblogs.com/lyt020321/p/11405676.html
Copyright © 2020-2023  润新知