- 博客(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 242
原创 链表
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 136
原创 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 96
原创 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 102
原创 骨牌铺方格
骨牌铺方格 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 117
原创 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 122
原创 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 238
原创 田忌赛马 (贪心)
#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 136
原创 第三套 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 99
原创 第二套 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 96
原创 第二套 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 118
原创 第二套 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 133
原创 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 125
原创 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 74
原创 第二套 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 74
原创 第二套 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 79
原创 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 113
原创 素数圆
#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 271
原创 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 98
原创 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 214
原创 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 79
原创 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 68
原创 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 205
原创 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 86
原创 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 78
原创 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 76
原创 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 111
原创 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 164
原创 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 90
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人