Description
Xuanxuan has n sticks of different length. One day, she puts all her sticks in a line, represented by S1, S2, S3, …Sn. After measuring the length of each stick Sk (1 <= k <= n), she finds...
分类:
其他好文 时间:
2015-05-15 21:31:42
阅读次数:
480
链接:
#include
int main()
{
puts("转载请注明出处[vmurder]谢谢");
puts("网址:blog.csdn.net/vmurder/article/details/43407071");
}
题解:
三个定义:高度h,v速度,Ah+Bv为s
首先我们在外圈枚举来固定其中一个权值,姑且枚举v吧。每次枚举值大写为V。
然后在内圈就可...
分类:
其他好文 时间:
2015-05-15 17:50:57
阅读次数:
211
字符串输出函数 puts格式: puts(字符数组名)功能:把字符数组中的字符串输出到显示器。 即在屏幕上显示该字符串。字符串输入函数 gets格式: gets (字符数组名)功能:从标准输入设备键盘上输入一个字符串。本函数得到一个返回值,即为该字符数组的首地址。1 #include"stdio.h...
分类:
其他好文 时间:
2015-05-13 21:37:42
阅读次数:
120
布局抄自MonoLite_Plus_0_4_3_by_Junior_Spirit,皮肤也是用的他的 Track List: //背景颜色 播放、播放+焦点、焦点、奇偶 $if(%el_isplaying%, $if(%el_focused%,$puts(backgroung_color,%B_col...
分类:
其他好文 时间:
2015-05-07 12:16:18
阅读次数:
308
使用前必须进行强制类型转换#include void test(const void *p);int main(){ int i = 123; int *p = &i; puts("my test:"); test(p);}void test(...
分类:
编程语言 时间:
2015-05-03 23:37:03
阅读次数:
173
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<unistd.h>
#include<windows.h>
#defineMAX256
intmain(void)
{
FILE*fa;
inti,count=0;
charch[MAX],file[MAX]="1.txt";
if((fa=fopen(file,"r"))==NULL)
{
puts("不能打开..
分类:
其他好文 时间:
2015-04-29 17:24:16
阅读次数:
156
//可以看出操作1和操作2是一对互逆操作
//即是一次操作1和一次操作2执行后,排列不变
//如果一种操作连续做i次能得到s
//如果i刚好等于k,puts("YES")
//如果不等,看剩下的k-i次操作能不能用一次操作1和一次操作2做完
#include
#include
#include
using namespace std ;
const int maxn = 110...
分类:
其他好文 时间:
2015-04-27 21:53:32
阅读次数:
108
昨天调试程序(见下面代码)遇到下面一个问题:
#include
int main()
{
int i = 1;
while(i)
{
char str[100];
printf("please input a str:\n");
gets(str);
puts(str);
printf("continue:1,break:0\n");
scanf("%...
分类:
编程语言 时间:
2015-04-27 09:59:03
阅读次数:
263
1.#include
void input(char *p, int b);
int main(void)
{
char ch[60];
int n;
printf("Please input the number:");
scanf("%d", &n);
getchar();
input(ch, n);
puts(ch);...
分类:
其他好文 时间:
2015-04-20 00:40:07
阅读次数:
138
#include
#include
int main(){
char temp,str[20];
int k,len,mark,flag,j;
while(scanf("%s %d",str,&k)!=EOF){
len=strlen(str);
if(k==0)
{
puts(str);
continue;
}
for(int i=0;i<len;i++...
分类:
其他好文 时间:
2015-04-15 21:34:42
阅读次数:
139