• 致一场我没打的CF


    (color{red}{这场CF我没打~~})


    (color{blue}{所以你写他干嘛???})

    但是我帮忙代打了2333(大嘘)


    (color{green}D)

    代码


    (color{yellow}C)

    code

    #include <bits/stdc++.h>
    #define maxn 250000
    using namespace std ;
    int n ,l , r , top ;
    char a[maxn] ;
    int main () {
    	cin >> n ;
    	for(int i = 1 ; i <= n ; i ++) {
    		cin >> a[i] ;
    		if(a[i] == '(') l ++ ;
    		else r ++ ; 
    	}
    	for(int i = 1 ; i <= n ; i ++) {
    		if(a[i] == '(' ) top ++ ;
    		else top -- ;
    		if(top < -1) {
    			puts("No") ;
    			return 0 ;
    		} 
    	}
    	if(l != r) {
    		puts("No") ;
    		return 0 ;
    	}else puts("Yes") ;
    	return 0 ;
    } 
    
    

    (color{brown}{B})

    
    #include <bits/stdc++.h> 
    using namespace std ;
    int b , g , n , ans ;
    int main() {
    	scanf("%d%d%d",&b,&g,&n);
    	for(int i = 0 ; i <= n ;i ++) {
    		if(i > b)
    			break;
    		if(n-i > g) 
    			continue;
    		ans ++ ;
    	}
    	printf("%d
    " , ans);
    	return 0;
    }
    

    (color{green}{A})

    #include <bits/stdc++.h> 
    using namespace std ;
    int n , d , e , t , s[20] ;
    bool f[100000005] ;
    int dl[10] = {0,1,2,5,10,20,50,100} ;
    int el[10] = {0,5,10,20,50,100,200} ;
    int main() {
    	scanf("%d%d%d",&n,&d,&e);
    	for(int i = 1 ;i <= 7 ; i ++)
    		s[++t] = d * dl[i] ;
    	for(int i = 1 ; i <= 6 ; i ++)
    		s[++t] = e * el[i] ;
    	f[0] = 1 ;
    	for(int i = 1 ; i <= t ; i ++)
    		for(int j = s[i] ; j <= n ; j ++)
    	    if(f[j-s[i]]) 
    	    	f[j] = 1 ;
    	for(int i = n ; i >= 0 ; i --) {
    		if(f[i] == 1) {
    			printf("%d
    ",n-i);
    			break;
    		}
    	}
    	return 0;
    }
    

    溜了溜了

  • 相关阅读:
    转:IOCP在网络应用中常见错误分析
    Ext.Button的禁用
    Excel连接字符串
    从表单为实体对象赋值
    根据指定类型创建数组
    Ext.GridPanel数据显示不正确
    vue 记事本
    杂谈(一)
    推荐《程序设计的 Top 10 做与不做》和《关于编程,鲜为人知的真相》
    (转)黄鸣博客:警惕29岁现象
  • 原文地址:https://www.cnblogs.com/lyt020321/p/11461585.html
Copyright © 2020-2023  润新知