这道题综合性挺强的,又牵扯到数论,又有线段树。线段树维护的信息就是区间中有多少个人没跳出去,然后计算出下一个人是剩下的人中第几个。我在这调程序调了好久,就是那个模来模去的弄得我头晕。不过题确实是好题,给赞。 1 #include 2 #include 3 #include 4 #include...
分类:
其他好文 时间:
2015-04-26 15:02:37
阅读次数:
120
#includeint main(){char sentence[100];int len=0,j,wordlen=0;gets(sentence);while(sentence[len]) len++;for(j=len-1;j>=0;j--){if(sentence[j]>='a'&&sente...
分类:
其他好文 时间:
2015-04-25 21:10:46
阅读次数:
125
#include
using namespace std;
int main()
{
char a[100];
int num=0;
int word=0;
char c;
int i,j=0;
gets(a);
for(i=0;(c=a[i])!='\0';i++)
{
if(c==' ')
{
word = 0;
}
...
分类:
其他好文 时间:
2015-04-25 12:19:45
阅读次数:
129
1.从缓冲区读走一个字符,相当于清除缓冲区2.前面的scanf()在读取输入时会在缓冲区中留下一个字符'\n'(输入完s[i]的值后按回车键所致),所以如果不在此加一个getchar()把这个回车符取走的话,gets()就不会等待从键盘键入字符,而是会直接取走这个“无用的”回车符,从而导致读取有误3...
分类:
其他好文 时间:
2015-04-25 12:01:57
阅读次数:
124
Option Explicit' VBA Script that gets info on the currently selected email using propertyAccessor and various syntaxes' (see other scripts at http://w...
分类:
编程语言 时间:
2015-04-24 15:56:14
阅读次数:
262
#include
#include
#include
#include
#include
using namespace std;
int main(){
string str;
set q;
char sss[1005];
while(gets(sss)){
str=sss;
q.clear();
if(str=="#") break;
int i;
for(i=0;...
分类:
其他好文 时间:
2015-04-23 00:01:31
阅读次数:
153
LoadRunner中常用的字符串操作函数有: strcpy(destination_string, source_string);strcat(string_that_gets_appended, string_that_is_appended);51Testing软件测试网:J3~c:c[(w...
分类:
其他好文 时间:
2015-04-22 20:01:34
阅读次数:
770
Who Gets the Most Candies?Time Limit: 5000msMemory Limit: 131072KBThis problem will be judged onPKU. Original ID:288664-bit integer IO format:%lld Jav...
分类:
其他好文 时间:
2015-04-21 14:22:56
阅读次数:
121
通过以下语句查看到发生物理读较大的SQL语句selectexecutions,
disk_reads,
buffer_gets,
round((buffer_gets-disk_reads)/buffer_gets,2)Hit_radio,
round(disk_reads/executions,2)reads_per_run,
sql_text,
sql_id,
last_load_time
Fromv$sqlarea
Whereexecutions>0
andb..
分类:
数据库 时间:
2015-04-20 19:01:49
阅读次数:
237
/* ASP.NET 默认上传文件是4M ,可以修改服务配置.. */ /// /// Gets a files formatted...
分类:
其他好文 时间:
2015-04-20 18:17:44
阅读次数:
89