首页
学习
活动
专区
工具
TVP
发布

开发 & 算法杂谈

专栏成员
66
文章
96069
阅读量
36
订阅数
Django-Database 之 Many-To-Many关系
这里对Many-To-Many即多对多的映射关系以详细事例来分析Django中Database操作多对多映射关系的一些基本用法和注意事项
chain
2018-08-02
6450
Coderbyte-Challenger之Letter Capitalize(单词字母大写)
Have the function LetterCapitalize(str) take the str parameter being passed and capitalize the first letter of each word. Words will be separated by only one space. 
chain
2018-08-02
7450
PAT Advanced 1005
Given a non-negative integer N, your task is to compute the sum of all the digits of N, and output every digit of the sum in English.
chain
2018-08-02
2820
PAT Advanced 1066
An AVL tree is a self-balancing binary search tree. In an AVL tree, the heights of the two child subtrees of any node differ by at most one; if at any time they differ by more than one, rebalancing is done to restore this property. Figures 1-4 illustrate the rotation rules.
chain
2018-08-02
2330
PAT Advanced 1067
1067. Sort with Swap(0,*) (25) 时间限制 100 ms 内存限制 32000 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue Given any permutation of the numbers {0, 1, 2,..., N-1}, it is easy to sort them in increasing order. But what if Swap(0, *) is the ONLY oper
chain
2018-08-02
2660
PAT Advanced 1042
Shuffling is a procedure used to randomize a deck of playing cards. Because standard shuffling techniques are seen as weak, and in order to avoid "inside jobs" where employees collaborate with gamblers by performing inadequate shuffles, many casinos employ automatic shuffling machines. Your task is to simulate a shuffling machine.
chain
2018-08-02
2600
PAT Advanced 1043
A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties:
chain
2018-08-02
2580
PAT Advanced 1001
Calculate a + b and output the sum in standard format -- that is, the digits must be separated into groups of three by commas (unless there are less than four digits).
chain
2018-08-02
3120
PAT Basic 1010
#include <stdio.h> int main() { int n, e, flag = 0; while (scanf("%d%d", &n, &e) != EOF) { if( n*e ) { if(flag) printf(" "); else flag = 1;
chain
2018-08-02
5180
PAT Basic 1009
#include<stdio.h> #include<string.h> /*此题和1008类似*/ void reverse(char *a,int left,int right) { while(left<right) { char temp=a[left]; a[left]=a[right]; a[right]=temp; left++;right--; } } int main() { char a[81]; gets(a); reverse(a,0,strlen(a)
chain
2018-08-02
3390
PAT Basic 1008
#include<stdio.h> #include<stdlib.h> /*三次逆置*/ void reverse(int *a,int left,int right) { while(left<right) { int temp=a[left]; a[left]=a[right]; a[right]=temp; left++;right--; } } int main() { int n,k,i; scanf("%d %d",&n,&k); int *a=(int *)m
chain
2018-08-02
4640
PAT Basic 1007
#include<stdio.h> #include<math.h> int a[100000]={0}; int main() { int n,i,j,flag,count=0; scanf("%d",&n); a[2]=a[3]=1; for(i=5;i<=n;i=i+2) { flag=1; for(j=3;j<=sqrt(i);j++) { if(a[j]==1) if(i%j==0) flag=0; } a[i]=flag; } i=3;
chain
2018-08-02
5340
PAT Basic 1006
#include<stdio.h> /*简单的模拟题*/ int main() { int n,a[3]={0},count=2,i; scanf("%d",&n); while(n/10 != 0) { a[count--]=n%10; n=n/10; } a[count]=n%10; if(a[0]!=0) for(i=0;i<a[0];i++) printf("%c",'B'); if(a[1]!=0) for(i=0;i<a[1];i++) printf(
chain
2018-08-02
5560
PAT Basic 1005
#include<stdio.h> #include<stdlib.h> int b[101]={0}; int main() { int n,i,temp,count=0,j,temp2; scanf("%d",&n); int *a=(int *)malloc(n*sizeof(int)); for(i=0;i<n;i++) scanf("%d",&a[i]); /*sort*/ for(i=0;i<n;i++) { int min=i; for(j=i;j<n;j++) {
chain
2018-08-02
9600
PAT Basic 1002
#include<stdio.h> char a[10][5]={"ling","yi","er","san","si","wu","liu","qi","ba","jiu"}; /*递归的从左至右输出各个位*/ void b(int sum,int count) { count++; if(sum/10 !=0 ) b(sum/10,count); if(count==1) printf("%s",a[sum%10]); else printf("%s ",a[sum%10]); }
chain
2018-08-02
6690
PAT Basic 1001
/*简单的模拟题*/ #include<stdio.h> int main() { int n,count=0; scanf("%d",&n); while(n!=1) { n=((n&1
chain
2018-08-02
6030
PAT Advanced 1065
Given three integers A, B and C in [-263, 263], you are supposed to tell whether A+B > C.
chain
2018-08-02
2540
较快速在一个数组中查找最大值和最小值(2)
/*分治法*/ #include<iostream> #include<string> #include<vector> #include<fstream> using namespace std; int a[16]={1,3,5,7,9,11,14,2,4,6,8,10,12,14,16,18}; int b[9]={3,1,5,9,4,2,7,6,10}; int t[2]; vector<string> splitEx(const string& src, string separate_chara
chain
2018-08-02
2.5K0
静态数据竞争检测工具之LOCKSMITH-安装和使用
静态数据竞争检测工具都是基于中间语言开发的,在安装之前必须要先安装Ocaml和CIL
chain
2018-08-02
5370
Redis源码阅读之rdb.c
REDIS_RDB_ENC_LZF |compressed_len | original_len | compressed_string
chain
2018-08-02
6430
点击加载更多
社区活动
【纪录片】中国数据库前世今生
穿越半个世纪,探寻中国数据库50年的发展历程
Python精品学习库
代码在线跑,知识轻松学
博客搬家 | 分享价值百万资源包
自行/邀约他人一键搬运博客,速成社区影响力并领取好礼
技术创作特训营·精选知识专栏
往期视频·千货材料·成员作品 最新动态
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档