Codeforces Round #378 (Div. 2), problem: (D) Kostya the Sculptor Solution In C

By | 2017-04-07T22:11:50+00:00 November 1st, 2016|Categories: C/C++, Programming|Tags: , , , , , , , , , , , |

#include #include #define N 100000 #define M 1000000007 #define MIN(A, B) ((A) < (B) ? (A) : (B)) int i1, i2, k; double max; struct item { int i, a, b, c; struct item *next; } *ht[N]; int hash(int a, int b) { long [...]

Codeforces Round #378 (Div. 2), Problem: (C) Epidemic in Monstropolis Solution in C

By | 2017-04-07T22:11:50+00:00 November 1st, 2016|Categories: C/C++, Programming|Tags: , , , , , , , |

Hi guys , i just tried the Epidemic in Monstropolis problem , hope you might like it . #include #include #define MAXN 500 int a[MAXN]; int b[MAXN]; int partial_sums[MAXN]; unsigned char d[MAXN + 1][MAXN + 1]; unsigned char equals[MAXN + 1][MAXN + 1]; int [...]

Codeforces Round #378 (Div. 2), Problem: (A) Grasshopper And the String Solution in C

By | 2017-04-07T22:11:51+00:00 October 31st, 2016|Categories: C/C++, Programming|Tags: , , , , , , , , |

Hi guys , i just tried the Grasshopper problem , hope you might like it . #include int main(){ char a[101];int k=-1,i,max=0,s; scanf("%s",a); for(i=0;a[i]!='\0';i++) { if(a[i]=='A'||a[i]=='E'||a[i]=='I'||a[i]=='O'||a[i]=='U'||a[i]=='Y') {s=i-k;k=i; if(s>max) max=s;} }s=i-k; if(s>max) max=s; printf("%d",max); return 0; }