2019年11月6日
摘要: #include <stdio.h> int main() { int n, m; long long Count=0; scanf("%d%d", &n, &m); int cur, pre=1; while(m--) { scanf("%d", &cur); if(cur>pre) Count+ 阅读全文
posted @ 2019-11-06 10:59 ComMario 阅读(143) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <string.h> #include <stdbool.h> int main() { char line1[110]; char line2[110]; char line3[210]; scanf("%s", line1); scanf( 阅读全文
posted @ 2019-11-06 10:58 ComMario 阅读(149) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <math.h> #include <stdbool.h> int IsPrime(int n) { if(n==1) return 1; if(n==2) return 1; if(n%2==0) return 0; int end=sqrt 阅读全文
posted @ 2019-11-06 10:57 ComMario 阅读(131) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <string.h> #include <stdbool.h> int main() { int n; scanf("%d", &n); char line[120]; scanf("%s", line); int alp[30]; int C 阅读全文
posted @ 2019-11-06 10:56 ComMario 阅读(128) 评论(0) 推荐(0)
摘要: #include <stdio.h> int main() { int n; int k; scanf("%d%d", &n, &k); while(k--) { if((n%10)!=0) --n; else n/=10; } printf("%d\n", n); return 0; } 阅读全文
posted @ 2019-11-06 10:56 ComMario 阅读(145) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <stdlib.h> int comp_inc(const void *first, const void *second); int main() { int a[5]; int i; for(i=0; i<4; ++i) { scanf(" 阅读全文
posted @ 2019-11-06 10:55 ComMario 阅读(139) 评论(0) 推荐(0)
摘要: #include <stdio.h> int main() { int n; double num; scanf("%d", &n); int i; double sum=0.0; for(i=0; i<n; ++i) { scanf("%lf", &num); sum+=num; } printf 阅读全文
posted @ 2019-11-06 10:54 ComMario 阅读(107) 评论(0) 推荐(0)
摘要: #include <stdio.h> #define Maxsize 50 struct uniform { int h; int g; }; int main() { int n; scanf("%d", &n); struct uniform Set[Maxsize]; int i; for(i 阅读全文
posted @ 2019-11-06 10:54 ComMario 阅读(103) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <string.h> #define Maxsize 3200 int main() { int letter[30]; memset(letter, 0, sizeof(letter)); char line[Maxsize]; gets(l 阅读全文
posted @ 2019-11-06 10:53 ComMario 阅读(106) 评论(0) 推荐(0)
摘要: #include <stdio.h> int main() { int n; int temp; int Count1=0, Count2=0; int Index1, Index2; scanf("%d", &n); int i; for(i=0; i<n; ++i) { scanf("%d", 阅读全文
posted @ 2019-11-06 10:52 ComMario 阅读(121) 评论(0) 推荐(0)
摘要: #include <stdio.h> int main() { int n; scanf("%d", &n); int i; for(i=1; i<=n; ++i) { if(i!=1) printf(" that "); if(i%2!=0) printf("I hate"); else prin 阅读全文
posted @ 2019-11-06 10:51 ComMario 阅读(93) 评论(0) 推荐(0)
摘要: #include <stdio.h> int main() { int n, m; int Count=0; scanf("%d%d", &n, &m); while((n>0)&&(m>0)) { --n; --m; ++Count; } if(Count%2==0) printf("Malvik 阅读全文
posted @ 2019-11-06 10:50 ComMario 阅读(93) 评论(0) 推荐(0)
摘要: #include <stdio.h> int main() { int max=-1, min=1000; int max_ind=0, min_ind=0; int n; int line; scanf("%d", &n); int i; for(i=0; i<n; ++i) { scanf("% 阅读全文
posted @ 2019-11-06 10:49 ComMario 阅读(95) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <string.h> #include <stdlib.h> #define Maxsize 110 int comp_inc(const void *first, const void *second); int main() { int L 阅读全文
posted @ 2019-11-06 10:47 ComMario 阅读(134) 评论(0) 推荐(0)
摘要: #include <stdio.h> int main() { int a, b; int Count=0; scanf("%d%d", &a, &b); while(a<=b) { ++Count; a*=3; b*=2; } printf("%d\n", Count); return 0; } 阅读全文
posted @ 2019-11-06 10:46 ComMario 阅读(89) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <string.h> #define Maxsize 110 int main() { char line1[Maxsize]; char line2[Maxsize]; scanf("%s", line1); scanf("%s", line 阅读全文
posted @ 2019-11-06 10:45 ComMario 阅读(122) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <stdlib.h> #define Maxsize 110 int comp_inc(const void *first, const void *second); int columns[Maxsize]; int main() { int 阅读全文
posted @ 2019-11-06 10:45 ComMario 阅读(104) 评论(0) 推荐(0)
摘要: #include <stdio.h> int main() { int n, h; scanf("%d%d", &n, &h); int temp, width=0; int i; for(i=0; i<n; ++i) { scanf("%d", &temp); if(temp<=h) ++widt 阅读全文
posted @ 2019-11-06 10:44 ComMario 阅读(117) 评论(0) 推荐(0)
摘要: #include <stdio.h> int main() { int a, b; int n; scanf("%d", &n); scanf("%d", &a); int Count=1; int i; for(i=0; i<n-1; ++i) { scanf("%d", &b); if((a%1 阅读全文
posted @ 2019-11-06 10:42 ComMario 阅读(153) 评论(0) 推荐(0)
摘要: #include <stdio.h> int main() { long long n, k; scanf("%I64d%I64d", &n, &k); long long even; if(n%2==0) even=n/2; else even=(n/2)+1; if(k<=even) print 阅读全文
posted @ 2019-11-06 10:41 ComMario 阅读(116) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <string.h> #include <stdbool.h> #define Maxsize 210 int main() { char sentence[Maxsize]; char wub[4]={'W', 'U', 'B'}; scan 阅读全文
posted @ 2019-11-06 10:41 ComMario 阅读(94) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <string.h> int main() { int a[5]; int total; memset(a, 0, sizeof(a)); int i; for(i=1; i<=4; ++i) { scanf("%d", &a[i]); } s 阅读全文
posted @ 2019-11-06 10:40 ComMario 阅读(127) 评论(0) 推荐(0)
摘要: #include <stdio.h> int main() { long long ans; long long n; scanf("%I64d", &n); long long i; if(n%2==0) ans=((n/2)*((n/2)+1))-((n/2)*(n/2)); else ans= 阅读全文
posted @ 2019-11-06 10:39 ComMario 阅读(99) 评论(0) 推荐(0)
摘要: #include <stdio.h> int main() { int k, n , w; scanf("%d%d%d", &k, &n, &w); int ans=(k*((w*(w+1))/2))-n; if(ans>0) printf("%d\n", ans); else printf("%d 阅读全文
posted @ 2019-11-06 10:39 ComMario 阅读(80) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <string.h> #define MAXSIZE 120 int main() { int cntlow=0; int cntupp=0; char str[MAXSIZE]; memset(str, 0, sizeof(str)); sc 阅读全文
posted @ 2019-11-06 10:37 ComMario 阅读(133) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <string.h> #define MAXSIZE 110 int main() { int giv[MAXSIZE]; int rec[MAXSIZE]; memset(giv, 0, sizeof(giv)); memset(rec, 0 阅读全文
posted @ 2019-11-06 10:37 ComMario 阅读(138) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <stdlib.h> #define MAXSIZE 60 int comp_inc(const void *first, const void *second); int main() { int pieces[MAXSIZE]; int n 阅读全文
posted @ 2019-11-06 10:36 ComMario 阅读(108) 评论(0) 推荐(0)
摘要: #include <stdio.h> int main() { int moves[5]={1,2,3,4,5}; int x; scanf("%d", &x); int ind=4; int Minsteps=0; while((x!=0)&&(ind>=0)) { if(x>=moves[ind 阅读全文
posted @ 2019-11-06 10:35 ComMario 阅读(122) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <string.h> #define MAXSIZE 100024//之前数据少开了一个量级 int money[MAXSIZE]; int main() { memset(money, 0, sizeof(money)); int a; sc 阅读全文
posted @ 2019-11-06 10:34 ComMario 阅读(148) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdbool.h> int comp(const void *a, const void *b); int main () { int year; int a[ 阅读全文
posted @ 2019-11-06 10:33 ComMario 阅读(223) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <string.h> #define MAXSIZE 105 int main() { char Berlandish[MAXSIZE]; char Birlandish[MAXSIZE]; scanf("%s", Berlandish); s 阅读全文
posted @ 2019-11-06 10:32 ComMario 阅读(90) 评论(0) 推荐(0)
摘要: #include <stdio.h> #define MAXSIZE 1024 char que[MAXSIZE]; int main() { int n, t; scanf("%d %d", &n, &t); scanf("%s", que); int i, j; char temp; for(j 阅读全文
posted @ 2019-11-06 10:31 ComMario 阅读(152) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include<string.h> #define MAXSIZE 30 int main() { char digits[30]; memset(digits, 0, sizeof(digits)); scanf("%s", digits); int len 阅读全文
posted @ 2019-11-06 10:31 ComMario 阅读(120) 评论(0) 推荐(0)
摘要: #include <stdio.h> int main() { int n; int p, q; int rooms=0; scanf("%d", &n); int i; for(i=0; i<n; ++i) { scanf("%d %d", &p, &q); if((q-p)>=2) ++room 阅读全文
posted @ 2019-11-06 10:29 ComMario 阅读(113) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <string.h> #include <stdbool.h> #define MAXSIZE 105 int main() { char str[MAXSIZE]; scanf("%s", str); int length=strlen(st 阅读全文
posted @ 2019-11-06 10:29 ComMario 阅读(160) 评论(0) 推荐(0)
摘要: #include <stdio.h> int main() { int n; int sum1=0, sum2=0, sum3=0; int x, y, z; scanf("%d", &n); int i; for(i=0; i<n; ++i) { scanf("%d %d %d", &x, &y, 阅读全文
posted @ 2019-11-06 10:27 ComMario 阅读(146) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include<string.h> #include <stdbool.h> #define MAXSIZE 105 int main() { char str[MAXSIZE]; scanf("%s", str); int length=strlen(str 阅读全文
posted @ 2019-11-06 10:27 ComMario 阅读(106) 评论(0) 推荐(0)
摘要: #include <stdio.h> int main() { int n; int sum1=0, sum2=0, sum3=0; int x, y, z; scanf("%d", &n); int i; for(i=0; i<n; ++i) { scanf("%d %d %d", &x, &y, 阅读全文
posted @ 2019-11-06 10:26 ComMario 阅读(172) 评论(0) 推荐(0)
摘要: #include <stdio.h> int main() { int dig; int flag=0; scanf("%d", &dig); if(dig%4==0) flag=1; else if(dig%7==0) flag=1; else if(dig%44==0) flag=1; else 阅读全文
posted @ 2019-11-06 10:25 ComMario 阅读(131) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <string.h> int main() { char hel[6]="hello"; char str[120]; memset(str, 0, sizeof(str)); scanf("%s", str); int length=strl 阅读全文
posted @ 2019-11-06 10:24 ComMario 阅读(127) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <string.h> int main() { char str[150]; int arr[35]; memset(str, 0, sizeof(str)); memset(arr, 0, sizeof(str)); scanf("%s", 阅读全文
posted @ 2019-11-06 10:23 ComMario 阅读(116) 评论(0) 推荐(0)
摘要: #include <stdio.h> int main() { int n; int a1,a2; int min=0; int cap=0; scanf("%d",&n); while(n>0) { scanf("%d %d",&a1,&a2); cap-=a1; cap+=a2; if(min< 阅读全文
posted @ 2019-11-06 10:22 ComMario 阅读(163) 评论(0) 推荐(0)
摘要: #include <iostream> #include <string> using namespace std; int main() { string stones; int n,count; while(cin>>n>>stones) { count=0; for(int i=0; i<st 阅读全文
posted @ 2019-11-06 10:21 ComMario 阅读(125) 评论(0) 推荐(0)
摘要: #include <iostream> #include <algorithm> using namespace std; int main() { int groups[100009], num[5]; int n, sum; while(cin>>n) { sum=num[1]=num[2]=n 阅读全文
posted @ 2019-11-06 10:21 ComMario 阅读(170) 评论(0) 推荐(0)
摘要: #include<stdio.h> #include<stdlib.h> int main() { int i, j; int temp; int t_i, t_j; int ans; for(i=1; i<=5; ++i) for(j=1; j<=5; ++j) { scanf("%d",&tem 阅读全文
posted @ 2019-11-06 10:20 ComMario 阅读(105) 评论(0) 推荐(0)
摘要: #include <iostream> #include <string> #include <cctype> using namespace std; int main() { string word; cin>>word; word[0]=toupper(word[0]); cout<<word 阅读全文
posted @ 2019-11-06 10:19 ComMario 阅读(83) 评论(0) 推荐(0)
摘要: #include <iostream> #include <string> #include <algorithm> using namespace std; #define maxSize 105 int main() { string exp; int digit[maxSize]; int l 阅读全文
posted @ 2019-11-06 10:18 ComMario 阅读(122) 评论(0) 推荐(0)
摘要: #include <iostream> #include <string> #include <cctype> using namespace std; int main() { string str1; string str2; int length; while(cin>>str1>>str2) 阅读全文
posted @ 2019-11-06 10:16 ComMario 阅读(186) 评论(0) 推荐(0)
摘要: #include <iostream> #include <string> #include <cctype> using namespace std; int main() { string str1; string str2; int length; while(cin>>str1>>str2) 阅读全文
posted @ 2019-11-06 10:16 ComMario 阅读(115) 评论(0) 推荐(0)
摘要: #include <iostream> #include <string> using namespace std; int main() { int n, plus, sub; string ope; while(cin>>n) { plus=sub=0; while(n--) { cin>>op 阅读全文
posted @ 2019-11-06 10:15 ComMario 阅读(134) 评论(0) 推荐(0)
摘要: #include <iostream> using namespace std; int main() { int m, n; cin>>m>>n; cout<<(m*n)/2<<endl; return 0; } 阅读全文
posted @ 2019-11-06 10:14 ComMario 阅读(99) 评论(0) 推荐(0)
摘要: #include <iostream> using namespace std; #define maxSize 10 int main() { int views[maxSize]; int n, res; while(cin>>n) { res=0; for(int i=0; i<n; ++i) 阅读全文
posted @ 2019-11-06 10:13 ComMario 阅读(124) 评论(0) 推荐(0)
摘要: #include <iostream> #include <cctype> #include <string> using namespace std; int main() { string str; cin>>str; int length; length=str.size(); for(int 阅读全文
posted @ 2019-11-06 10:12 ComMario 阅读(142) 评论(0) 推荐(0)
摘要: #include <iostream> using namespace std; #define maxSize 60 int main() { int score[maxSize]; int n, k, res; cin>>n>>k; res=0; for(int i=0; i<n; ++i) c 阅读全文
posted @ 2019-11-06 10:11 ComMario 阅读(89) 评论(0) 推荐(0)
摘要: #include <iostream> #include <string> using namespace std; int main() { string word; int length, n; cin>>n; for(int i=0; i<n; ++i) { cin>>word; length 阅读全文
posted @ 2019-11-06 10:10 ComMario 阅读(102) 评论(0) 推荐(0)
摘要: #include <iostream> using namespace std; int main() { long long n, m, a, r, c; cin>>n>>m>>a; r=n/a; if(n%a!=0) ++r; c=m/a; if(m%a!=0) ++c; cout<<r*c<< 阅读全文
posted @ 2019-11-06 10:08 ComMario 阅读(92) 评论(0) 推荐(0)
摘要: #include <iostream> using namespace std; int main() { int a; cin>>a; if((a>=4) && (a%2==0)) cout<<"YES"<<endl; else cout<<"NO"<<endl; return 0; } 阅读全文
posted @ 2019-11-06 10:07 ComMario 阅读(155) 评论(0) 推荐(0)
摘要: #include <stdio.h> int main() { int n, m; scanf("%d %d", &n, &m); int i, j; int Count=0; for(i=1; i<=n; ++i) { if((i%2)!=0) { for(j=0; j<m; ++j) print 阅读全文
posted @ 2019-11-06 09:18 ComMario 阅读(132) 评论(0) 推荐(0)