码迷,mamicode.com
首页 >  
搜索关键字:include    ( 84546个结果
用贪心解决删数问题
任务描述 有一个长度为n(n <= 240)的正整数,从中取出s(s < n)个数,使剩余的数保持原来的次序不变,求这个正整数经过删数之后最小是多少。 输入格式 第一行输入n和s 输出格式 输出一个整数 输入样例 178543 4 输出样例 13 1 #include<stdio.h> 2 #inc ...
分类:其他好文   时间:2021-06-02 11:25:02    阅读次数:0
c语言中使用putchar显示字符串
c语言中使用putchar显示字符串 1、 #include <stdio.h> int put(char x[]) { int i = 0; while(x[i]) putchar(x[i++]); } int main(void) { char str[128]; printf("str: ") ...
分类:编程语言   时间:2021-06-02 11:15:10    阅读次数:0
20210524考试—景区路线规划题解
考场上爆搜的每个点到达的概率,$TLE$理所当然,由于搜概率不太好记忆化,所以这个方法可能也只能到这了 code #include <cstdio> #include <cstring> #include <algorithm> #define printf Ruusupuu=printf #def ...
分类:其他好文   时间:2021-06-02 11:14:15    阅读次数:0
c语言 9-7
1、 #include <stdio.h> void put(char x[], int n) { while(n-- > 0) printf(x); putchar('\n'); } int main(void) { char str[128]; int n; printf("str: "); s ...
分类:编程语言   时间:2021-06-02 11:11:52    阅读次数:0
【ybt金牌导航4-6-2】【luogu P3835】可持久化平衡树
要你支持一些操作。 插入数,删除数,查询数排名,查询某个排名的数,查询数的前驱后继。 但是它要求可以可持久化,即每次会在给定的历史版本上改动。 ...
分类:其他好文   时间:2021-06-02 11:01:10    阅读次数:0
socket_client
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/types.h> #include <sys/socket.h> #include <sys/un.h> #include <netinet/in.h> ...
分类:其他好文   时间:2021-06-02 10:49:05    阅读次数:0
实验5
任务1#include <stdio.h> const int N=3; int main() { int a[N] = {1, 2, 3}; int i; printf("通过数组名和下标直接访问数组元素:\n"); for(i=0; i<N; i++) printf("%d: %d\n", &a ...
分类:其他好文   时间:2021-06-02 10:47:49    阅读次数:0
c语言求输入的任一整数的各位数之和
源码: # include<stdio.h> int main(void){int a,i=0,sum=0;scanf("%d",&a);if(a<0) a=-a;//求负整数的while(a){sum+=(a%10);//sum存各位数之和a/=10;}printf("各位数字之和为:%d\n", ...
分类:编程语言   时间:2021-05-25 18:29:36    阅读次数:0
#define 连接字符串
define连接字符串 #define conn(x,y) x##y,连接x与y #define toString(x) #x,将x变成字符串 #include <stdio.h> #define conn(x,y) x##y #define toChar(x) #x int main(void) ...
分类:其他好文   时间:2021-05-25 18:17:24    阅读次数:0
Codeforces Round #722 (Div. 2)
题目:https://codeforc.es/contest/1529 A. Eshag Loves Big Arrays 题意:略 题解:发现随便取两个不同的数,一定可以删掉大的那个数。所以最后留下的肯定是最小的所有数。 #include<iostream> #include<algorithm> ...
分类:其他好文   时间:2021-05-25 18:14:45    阅读次数:0
84546条   上一页 1 ... 22 23 24 25 26 ... 8455 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!