码迷,mamicode.com
首页 >  
搜索关键字:scanf    ( 10388个结果
将一个数组中的值按逆序重新存放
#include <stdio.h>int main(){ int i,a[100],number,mid,temp1,temp2; printf("How many numbers do you want to enter? \n"); scanf("%d",&number);//确定数组长度 p ...
分类:编程语言   时间:2020-05-31 11:02:52    阅读次数:258
树形DP(2)
一、P2656 采蘑菇 #include<cstring> #include<cstdio> #include<algorithm> #include<iostream> #include<cmath> using namespace std; #define maxn 80010 #define ...
分类:其他好文   时间:2020-05-31 00:58:12    阅读次数:53
Windows程序设计
1. Windows程序设计基础 1.1 代码风格 #include "stdafx.h" #include <windows.h> void Alert(int i); int main(int argc, char* argv[]) { Alert(2); return 0; } void Al ...
分类:Windows程序   时间:2020-05-30 21:39:53    阅读次数:104
7-3 停车场管理 (20point(s))
设有一个可以停放n辆汽车的狭长停车场,它只有一个大门可以供车辆进出。车辆按到达停车场时间的先后次序依次从停车场最里面向大门口处停放 (即最先到达的第一辆车停放在停车场的最里面) 。如果停车场已放满n辆车,则以后到达的车辆只能在停车场大门外的便道上等待,一旦停车场内有车开走,则排在便道上的第一辆车可以 ...
分类:其他好文   时间:2020-05-30 20:16:45    阅读次数:141
太平洋赛题解
题解: t1: 代码: #include <cstdio> int main(){ int a,b,c; scanf("%d%d%d",&a,&b,&c); printf("%d",a+b+c); return 0; } 典型的入门问题a+b problem的一点拓展. 看到fi=a*f_{i-1} ...
分类:其他好文   时间:2020-05-30 18:21:53    阅读次数:47
匈牙利算法
匈牙利算法 #include <iostream> #include <vector> #include <cstdio> #include <cstring> #include <queue> using namespace std; #define ll long long #define pb ...
分类:编程语言   时间:2020-05-29 23:35:50    阅读次数:77
[SCOI2009]粉刷匠(分组背包)
Problem windy有 N 条木板需要被粉刷。 每条木板被分为 M 个格子。 每个格子要被刷成红色或蓝色。 windy每次粉刷,只能选择一条木板上一段连续的格子,然后涂上一种颜色。 每个格子最多只能被粉刷一次。 如果windy只能粉刷 T 次,他最多能正确粉刷多少格子? 一个格子如果未被粉刷或 ...
分类:其他好文   时间:2020-05-29 19:40:35    阅读次数:68
【CF】Sereja and Arcs
#include <bits/stdc++.h> #define llong long long using namespace std; const int N = 1e5; const int P = 1e9+7; const llong INV2 = 5e8+4; int nxt[N+3]; ...
分类:其他好文   时间:2020-05-29 19:24:23    阅读次数:37
【CF-1358 C. Celex Update】
C. Celex Update 题意 有一个无限大的表格,按照某个方式填上数字。给出T个询问,每个询问 给出两个坐标$(x1,y1),(x2,y2)$,只能向下或者向右移动,问从第一个点移动 到第二个点,有多少种不同的路径和。 题解 直接猜的是,所有路径和都不相同。 写组合公式的时候,突然想到这个答 ...
分类:其他好文   时间:2020-05-28 11:37:02    阅读次数:68
13 数组倒序
//数组倒叙排列 #include<stdio.h> #define SIZE 5 void dao(int*, int size); main() { int a[SIZE]; int i; for (i = 0;i < SIZE;i++) { scanf_s("%d", &a[i]); } da ...
分类:编程语言   时间:2020-05-28 00:42:59    阅读次数:52
10388条   上一页 1 ... 33 34 35 36 37 ... 1039 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!