1 #include 2 #include 3 using namespace std; 4 int main() 5 { 6 long long t,n; 7 cin >> t; 8 while(t--){ 9 cin >> n;10 do...
分类:
其他好文 时间:
2016-01-24 11:36:15
阅读次数:
147
using System;using System.Data;using System.Configuration;using System.Web;using System.Web.Security;using System.Collections;using System.Data.SqlCli...
分类:
数据库 时间:
2016-01-24 11:35:29
阅读次数:
159
寻找字符串中第一个仅仅出现一次打字符代码例如以下:#include #include using namespace std;char findfirstoncechar(string &str){ int arr[255] = {0}; int i; for (i = 0; i<str.size(...
分类:
其他好文 时间:
2016-01-24 11:34:26
阅读次数:
128
// Example3.cpp : 定义控制台应用程序的入口点。#include "StdAfx.h"#include #include using namespace std;int main(void){ string str,str1,str2; int index; //推断截取的子串是否由...
分类:
编程语言 时间:
2016-01-24 11:33:21
阅读次数:
136
因为是全连接图,所以也可以用最小生成树这道题给边加了一个限制条件,(10#include #include #include using namespace std;#define sf scanf#define pf printf#define debug printf("!\n")#define...
分类:
其他好文 时间:
2016-01-24 11:32:05
阅读次数:
118
C和C++中可对指针进行加减,但对其进行乘除则基本无实际意义。一般来说,对指针进行减法的前提是减数和被减数均指向同一数组。加法同理。需要注意的是,两个指针的减法,结果是两个地址之间索引变量的数目,而不是占用内存的字节数。例如下面例子:1 #include2 using namespace std;3...
分类:
编程语言 时间:
2016-01-24 11:28:50
阅读次数:
193
while(t--)最后结果t=-1#include #include #include #include #include #include #include #include using namespace std;#define MEM(a,b) memset(a,b,sizeof(a))#d...
分类:
其他好文 时间:
2016-01-24 01:51:12
阅读次数:
187
1 using System; 2 using System.Windows; // 实现弱事件需要引用 WindowsBase 程序集 3 4 namespace 事件和弱事件的示例解说 5 { 6 class Program 7 { 8 sta...
分类:
其他好文 时间:
2016-01-24 00:35:49
阅读次数:
206
题目比较简单,反而我觉得这道题英语比算法难233333读入数据后,循环判断每个位置是不是都是2就行 1 #include 2 #include 3 #include 4 using namespace std; 5 6 #define REP(n) for(int o=0;o=0&&i+j<...
分类:
其他好文 时间:
2016-01-24 00:33:55
阅读次数:
250
a,b 为二进制位串d:下一进位c:当前进位x:和的当前位#include #include #include using namespace std;int main(){ string a = "101"; string b = "11111"; string s; st...
分类:
其他好文 时间:
2016-01-24 00:25:44
阅读次数:
155