自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(29)
  • 收藏
  • 关注

原创 123

#include <stdio.h>#include <string.h>#include <ctype.h>struct atom { char name[2]; int weight;};struct atom atoms[700];int cnt, cap;char molcu[100000];int search(char* a){ ...

2020-04-20 23:37:19 226

原创 链表

struct stud_node *createlist(){struct stud_node *head, *tail; head = tail = NULL; int number; while(~scanf("%d", &number) && number!=0){ struct stud_node *p = (struct stud_node*)...

2020-04-20 22:05:18 121

原创 Super Jumping! Jumping! Jumping!

Super Jumping! Jumping! Jumping! Time Limit : 2000/1000ms (Java/Other) Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 10 Accepted Submission(s) : 7Problem Description Nowadays, ...

2020-04-11 23:49:56 80

原创 Common Subsequence

Common Subsequence Time Limit : 2000/1000ms (Java/Other) Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 12 Accepted Submission(s) : 5Problem Description A subsequence of a given...

2020-04-11 17:51:29 85

原创 骨牌铺方格

骨牌铺方格 Time Limit : 2000/1000ms (Java/Other) Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 23 Accepted Submission(s) : 8Problem Description 在2×n的一个长方形方格中,用一个1× 2的骨牌铺满方格,输入n ,输出铺...

2020-03-29 03:34:04 106

原创 DNA Sorting

DNA Sorting Time Limit : 2000/1000ms (Java/Other) Memory Limit : 20000/10000K (Java/Other)Total Submission(s) : 64 Accepted Submission(s) : 20Problem Description One measure of unsortedness'' ...

2020-03-27 04:57:00 107

原创 Spreadsheet

Problem Description In 1979, Dan Bricklin and Bob Frankston wrote VisiCalc, the first spreadsheet application. It became a huge success and, at that time, was the killer application for the Apple II c...

2020-03-26 02:30:28 214

原创 田忌赛马 (贪心)

#include <stdio.h>void sort(int a, int n){ for( int i=0; i<n-1; i++){  int m=i;  for( int j=i+1; j<n; j++){   if(a[m]>a[j]) m = j; &nb...

2020-03-25 02:02:56 115

原创 第三套 1001

#include <stdio.h>int main(){ int n; while(~scanf("%d", &n) && n!=0){  int begin[n], end[n];  for(int i=0; i<n; i++) scanf("%d %d", &b...

2020-03-24 00:30:17 82

原创 第二套 1006

#include <stdio.h>long long numbers[1000000];int main(){ int a, b, n, k; numbers[0] = numbers[1] = 1; while(scanf("%d%d%d", &a, &b, &n) && a!=b!=n!=0){&...

2020-03-22 18:56:48 82

原创 第二套 1005

#include <stdio.h>long long numbers[1000000];int main(){ int num = 2, n; numbers[0] = 7%3; numbers[1] = 11%3; while(~scanf("%d", &n)){  if(n>=num){&...

2020-03-21 17:02:37 102

原创 第二套 1004

#include <stdio.h>long long power(int a, int b){ long long ans = 1; while(b){  if(b&1) ans = (ansa)%1000;  a = aa%1000;  b >>= 1; }...

2020-03-20 15:01:07 117

原创 1003

#include <stdio.h>long long pow(long long a){long long ans = 1, b = a;while(b){if(b&1) ans = (ansa)%10;a = aa%10;b >>= 1;}return ans;}int main(){int n;scanf("%d", &n);...

2020-03-19 16:40:21 111

原创 1002

#include <stdio.h>int main(){ int n, m, t; while(~scanf("%d %d", &n, &m)){  if(n>m){   t = m;   m = n;   n = t...

2020-03-18 11:09:21 57

原创 第二套 1001

#include <stdio.h>int main(){int n;while(~scanf("%d",&n) && n!=0){int f = 0, s, time = n5;while(n–){scanf("%d", &s);int t = s-f;if(t>0) time += t6;else time += (t4)-...

2020-03-17 17:54:22 59

原创 第二套 1000

#include <stdio.h>int main(void){long long num;while(~scanf("%d", &num)){long long sum = 0;if(num<0) num *= -1;for(long long i=1; i<=num; i++){sum += i;}printf("%lld\n\n", su...

2020-03-16 15:53:36 63

原创 1012

#include <stdio.h>int main(){int t;scanf("%d", &t);while(t–){int n, m;int cnt = 1;while(~scanf("%d%d", &n, &m) && n || m){int ans = 0;for(int i=1; i<n; i++){for...

2020-03-14 21:32:33 101

原创 素数圆

#include <stdio.h>#include <math.h>int num[21] = {0};int n, visit[21] = {0};int prime(int num){for(int i=2; i<=sqrt(num); i++){if(num%i==0) return 0;}return 1;}void dfs( int k...

2020-03-14 20:04:20 256

原创 1010

#include <stdio.h>#include <string.h>#define steps(last, step, mod)((last + step)%(mod))int main(){int step, mod;while(~scanf("%d %d", &step, &mod)){int seeds[mod], num = 0,...

2020-03-14 18:06:10 75

原创 1009

#include <stdio.h>int main(){ char n[1000]; while(~scanf("%s", &n) && n[0]!=‘0’){  int sum = 0;  for(int i=0; n[i]!=’\0’; i++){   ...

2020-03-13 21:47:32 178

原创 1008

#include <stdio.h>#include <math.h>int main(){ int n; scanf("%d", &n); while(n–){  double m = 1;  long a;  scanf("%ld", &a);&...

2020-03-13 20:08:57 70

原创 1007

#include <stdio.h>#include <string.h>int main(){ char s[250], c[10]; int n = 100; for(int i=0; i<100; i++){  int r;  scanf("%s", &c);&nbs...

2020-03-12 22:41:20 61

原创 1006

#include <stdio.h>int main(){int a, b;while(~scanf("%d %d", &a, &b)){printf("%d\n\n", a+b);}return 0;}

2020-03-12 19:29:06 191

原创 1005

#include <stdio.h>int main(){int a;while(scanf("%d", &a)!=EOF){int sum = 0;while(a–){int s;scanf("%d", &s);sum += s;}printf("%d\n", sum);}return 0;}

2020-03-11 16:30:47 72

原创 1004

#include <stdio.h>int main(){int n;scanf("%d", &n);while(n–){int a, sum = 0;scanf("%d", &a);while(a–){int s;scanf("%d", &s);sum += s;}printf("%d\n", sum);}return 0;}...

2020-03-11 16:20:38 66

原创 1003

#include <stdio.h>int main(){int a;scanf("%d", &a);while( a!=0 ){int sum = 0, b;while(a–){scanf("%d", &b);sum += b;}printf("%d\n", sum);scanf("%d", &a);};return 0;}...

2020-03-10 14:37:56 67

原创 1002

#include <stdio.h>int main(){int a, b;while(scanf("%d %d", &a, &b)){if(a= =0 && b= =0) break;printf("%d\n", a+b);};return 0;}

2020-03-10 14:08:54 99

原创 1000

#include <stdio.h>int main(){int a, b;while(scanf("%d %d", &a, &b)!=EOF) printf("%d\n", a+b);return 0;}

2020-03-09 20:37:03 151

原创 1001

#include <stdio.h>int main(){int n;scanf("%d", &n);while(n–){int a, b;scanf("%d %d", &a, &b);printf("%d\n", a+b);}return 0;}

2020-03-09 20:35:30 77

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除