关于这个错误:Subversion detected an unsupported working copy version while checking the status of 'XXXX'. Most likely you upgraded another Subversion client...
分类:
其他好文 时间:
2014-07-09 19:13:25
阅读次数:
345
python: 循环else: while true: if x>1: print() break else: print() 文件循环: for line in open(‘test.txt’): print(line,end=’’) 获...
分类:
编程语言 时间:
2014-07-09 15:52:47
阅读次数:
204
static void Main(string[] args) { const string UN = "admin"; const string PW = "123456"; string usename, password; int i=0; while (i 3) { Console....
分类:
其他好文 时间:
2014-07-09 13:42:30
阅读次数:
172
00编写一个程序,接受用户的输入并保存为新的文件:def file_write(file_name): f = open(file_name, 'w') print('请输入内容【单独输入\':w\'保存退出】:') while True: write_some ...
分类:
其他好文 时间:
2014-07-08 22:10:19
阅读次数:
353
def Merge(head1, head2):
if head1 == None: return head2
if head2 == None: return head1
psuhead = ListNode(-1)
tail = psuhead
while head1 and head2:
if head1.val < head2.val:
cur = head1
...
分类:
其他好文 时间:
2014-07-08 18:46:04
阅读次数:
227
1.先序遍历非递归算法
#define maxsize 100
typedef struct {
Bitree Elem[maxsize];
int top;
} SqStack;
void PreOrderUnrec(Bitree t) {
SqStack s;
StackInit(s);
p=t;
while (p!=...
分类:
其他好文 时间:
2014-07-08 17:13:18
阅读次数:
267
def reverse(head):
if head == None or head.next == None:
return head
psuhead = ListNode(-1)
while head:
nexthead = head.next
head.next = psuhead.next
psuhead.next = head
head = nexthead
...
分类:
其他好文 时间:
2014-07-08 15:27:58
阅读次数:
183
def isOdd(n):
return n & 1
def Reorder(data, cf = isOdd):
odd = 0
even = len( data ) - 1
while True:
while not isOdd( data[ even ]) : even -= 1
while isOdd( data[ odd ]) : odd += 1
if odd ...
分类:
其他好文 时间:
2014-07-08 12:47:26
阅读次数:
276
题目:构造n位01串,其中有m个1的所有组合。
分析:搜索、枚举。可以利用库函数,求解,也可以利用dfs求解;我这里采用位运算计算组合数。
说明:注意库啊!
#include
#include
#include
using namespace std;
int S[20];
int main()
{
int T,N,M;
while ( cin >> T )
for ( i...
分类:
其他好文 时间:
2014-07-08 11:24:33
阅读次数:
199
#include<iostream>
usingnamespacestd;
structnode{
intd;
structnode*next;
};//定义结点
node*build1()//头插法构造单链表
{
node*p;//指向新建结点
node*head;//头指针
head=NULL;
p=head;
intx;
cin>>x;
while(x!=-1)
{
p=newnode;
p->d=x;
p-&g..
分类:
其他好文 时间:
2014-07-08 09:06:06
阅读次数:
220